Drop Function Not Being Called

I have the AllowDrop constraint enabled and the function is triggered when dragging a symbol from the palette but NOT when dragging & dropping and existing node.  Screenshots attached.
$("#Diagram").ejDiagram({
    defaultSettings: {
        node: {
            width: 220,
            height: 90,
            constraints: ej.datavisualization.Diagram.NodeConstraints.Default | ej.datavisualization.Diagram.NodeConstraints.AllowDrop
        },
    },
    drop: pm.drop,
    drag: pm.drag
});


drop: function (args) {
    console.log("Drop Function Called");
};


Video: https://www.screencast.com/t/PdpTASX6E

Attachment: dragdrop_550605a8.zip

1 Reply 1 reply marked as answer

AR Aravind Ravi Syncfusion Team November 18, 2020 07:11 AM UTC

Hi Dsoftware, 
 
We have created a sample to notify the event when node position gets changed. In the diagram, drop event gets triggered if any node gets dropped on other node if that node has AllowDrop constraints and drag and drop the node from palette to diagram. If we drag and drop the node in diagram area means then drag event gets triggered. Please refer to the below code snippet and sample 
 
drop: function(args) { 
                    console.log("drop event gets triggered"); 
                  }, 
                  drag: function(args) { 
                  if(args.dragState === 'completed') { 
                   console.log("Node Position gets Changed"); 
                } 
                } 
 
 
For more information about drag and drop event , please refer to below UG link 
 
 
 
Regards 
Aravind Ravi 


Marked as answer
Loader.
Up arrow icon