Merge pull request #3822 from xyflow/refactor/on-node-drag-types

refactor(types): OnNodeDrag
This commit is contained in:
Moritz Klack
2024-01-23 10:05:13 +01:00
committed by GitHub
14 changed files with 74 additions and 48 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
);