Drag node end

Hello guys,

Working with eJDiagram i need to capture the dragEnd event to save the last node position. Right now i'm capturing the drag event, but this is called multiple times until it arrives to the last position. I just want to call it once with the last position. Is there any way to do this?

Thank you so much

1 Reply

SG Shyam G Syncfusion Team March 3, 2016 05:25 AM UTC

Hi Luis,

To achieve your requirement, please use dragState arguments in the drag event which returns the state of drag event (Starting, dragging, completed). please refer to the code example and online UG documentation link below.

Code example:

$("#diagram").ejDiagram({

            //define drag event

            drag: drag,

        });

        function drag(args) {

            //set an dragState as completed to get the node's last position

            if (args.dragState === "completed") {

                alert("node dragging completed")

            }
        }

UG documentation link:http://help.syncfusion.com/js/api/ejdiagram#events:drag

Regards,
Shyam G


Loader.
Up arrow icon