refactor(types): OnNodeDrag

This commit is contained in:
moklick
2024-01-22 17:05:26 +01:00
parent 07ee0c5bba
commit 34c77caab3
13 changed files with 59 additions and 41 deletions
-1
View File
@@ -79,7 +79,6 @@ export {
type OnError,
type NodeProps,
type NodeOrigin,
type OnNodeDrag,
type OnSelectionDrag,
Position,
type XYPosition,
+1 -2
View File
@@ -15,7 +15,6 @@ import {
type XYPosition,
type CoordinateExtent,
type UpdateConnection,
type NodeBase,
type NodeDragItem,
errorMessages
} from '@xyflow/system';
@@ -67,7 +66,7 @@ export function createStore({
const updateNodePositions: UpdateNodePositions = (nodeDragItems, dragging = false) => {
store.nodes.update((nds) => {
return nds.map((node) => {
const nodeDragItem = (nodeDragItems as Array<NodeBase | NodeDragItem>).find(
const nodeDragItem = (nodeDragItems as Array<Node | NodeDragItem>).find(
(ndi) => ndi.id === node.id
);