fix: node selection rect not dragging correctly
* issue comes from revue-draggable (has been fixed in 0.0.12) naming collision of the prop onDrag (callback fn) and the way JSX events are bound (onDrag instead of drag)
This commit is contained in:
@@ -1,4 +1,14 @@
|
||||
import { computed, CSSProperties, defineComponent, HTMLAttributes, onBeforeUnmount, PropType, provide, watchEffect } from 'vue';
|
||||
import {
|
||||
computed,
|
||||
CSSProperties,
|
||||
defineComponent,
|
||||
HTMLAttributes,
|
||||
inject,
|
||||
onBeforeUnmount,
|
||||
PropType,
|
||||
provide,
|
||||
watchEffect
|
||||
} from 'vue';
|
||||
import GraphView from '../GraphView';
|
||||
import DefaultNode from '../../components/Nodes/DefaultNode';
|
||||
import InputNode from '../../components/Nodes/InputNode';
|
||||
@@ -538,7 +548,7 @@ const RevueFlow = defineComponent({
|
||||
*/
|
||||
},
|
||||
setup(props, { slots }) {
|
||||
const store = configureStore(initialState)();
|
||||
const store = typeof inject('store') !== 'undefined' ? inject<RevueFlowStore>('store')! : configureStore(initialState)();
|
||||
provide<RevueFlowStore>('store', store);
|
||||
store.setElements(props.elements);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user