OnDrop(IBlazorDropEventArgs args) - only works for first time node dropped to diagram control - what about drag and drop of existing nodes
Example: Dragging from stencil to diagramcontrol (not the classic one) does fire the OnDrop event however when we drag and drop the SAME new node which is now already on the diagram it does NOT fire ondrag ondrop etc events? Is there a way to ensure existing node drag and drop events fire and can be intercepted.
Example: We want to be able to detect target node when one node is dropped onto another existing node - NOT from stencil - nodes and groups already on the diagram.
BRBalavignesh RaviChandran Syncfusion Team March 3, 2023 09:19 AM UTC
PositionChanging and PositionChanged events are used to detect the dragging and dropping of any nodes within the diagram canvas. In these events, you will get the source node and the current position of the node from the corresponding event arguments.
If the requirement is to detect the target node after the drop, then you can use the DragDrop event, where you will get the target node from the event arguments. The DragDrop eventcan beinvoked by enabling the AllowDrop constraints in the target node, which shows the highlighters when you drag the node and mouse hover on another node.
Note: The OnDrop (IBlazorDropEventArgs args) event belongs to our Classic SfDiagram control. We suggest you use SfDiagramComponent since it will provide better performance than SfDiagram and SfDiagramComponent will be actively developed in the future. You can use SfDiagramComponent to build a rich diagram editor-style application. For your reference, we have shared our online help documentation and a demo link.