revert(core): block pane ctx menu if panOnDrag includes [2] (right-click) (#2001)
* revert(core): block pane ctx menu if panOnDrag includes [2] (right-click) Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(changeset): add --------- Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import type { Edge, Node, ValidConnectionFunc } from '@vue-flow/core'
|
||||
import { ConnectionMode, Panel, VueFlow, isNode, useVueFlow } from '@vue-flow/core'
|
||||
import type { Edge, Node } from '@vue-flow/core'
|
||||
import { Panel, VueFlow, isNode, useVueFlow } from '@vue-flow/core'
|
||||
|
||||
import { Background } from '@vue-flow/background'
|
||||
import { Controls } from '@vue-flow/controls'
|
||||
@@ -45,22 +45,10 @@ function resetViewport() {
|
||||
function toggleclass() {
|
||||
return nodes.value.forEach((el) => (el.class = el.class === 'light' ? 'dark' : 'light'))
|
||||
}
|
||||
|
||||
const isValidConnection: ValidConnectionFunc = (...args) => {
|
||||
console.log(args)
|
||||
return true
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VueFlow
|
||||
:nodes="nodes"
|
||||
:edges="edges"
|
||||
:connection-mode="ConnectionMode.Strict"
|
||||
:is-valid-connection="isValidConnection"
|
||||
fit-view-on-init
|
||||
class="vue-flow-basic-example"
|
||||
>
|
||||
<VueFlow :nodes="nodes" :edges="edges" class="vue-flow-basic-example" fit-view-on-init>
|
||||
<Background />
|
||||
<MiniMap />
|
||||
<Controls />
|
||||
|
||||
Reference in New Issue
Block a user