#Does anyone about how to fix a node

1 messages · Page 1 of 1 (latest)

keen shadow
#

Issue Context:- Now i need to create five cutsom node and these has to be fixed we should able to move are dragg or zoom .Now the Issue after rendering the nodes if press and hold on nodes still i am able to move how can achieve it.

Thanks in advance

grim crow
#

draggable and zoomable are not valid props
Neither is paneMovable

The list of props can be found here: https://reactflow.dev/api-reference/react-flow

Might be you are looking for nodesDraggable which you can set to false to disable dragging of nodes (although this will not prevent them from being selected).

As for disabling zooming and panning, there's a couple props that handle this like panOnDrag, panOnScroll, zoomOnScroll and zoomOnPinch - all of which you can set to false to prevent any sort of interaction with the pane

React Flow - Customizable library for rendering workflows, diagrams and node-based UIs.

#

Oh I should add: What you experience with "holding and dragging" is not the node actually moving but the pane moving

You haven't added a listener for onNodesChange so no interactivity with nodes would happen (meaning no selection, no position change etc.)
So in that regard you can technically skip using nodesDraggable since you aren't applying those changes anyway ^^

keen shadow
#

That's lot of content once but understood i will try these and Dm again. @grim crow Can I DM you for any queries related to React-flow diagrams ?.

grim crow
#

Better to just write into this Thread 😄