Event Fires Twice

I've been studying the syncfusion BPMN showcase project located at:

https://github.com/syncfusion/ej2-showcase-angular-bpmn-editor

It's quite amazing! I really appreciate the depth of this example.  I have been studying it and noticed that this event (see screenshot below) fires twice when dragging items off the palette onto the canvas.

Is this bug? I can't see why this would happen.

The way I can see it was firing twice was by using Firefox's development tools and putting a breakpoint here.



3 Replies

GD Gobinath Dhamotharan Syncfusion Team July 19, 2023 07:46 AM UTC

Hi,  

In diagram, the function getNodeDefaults is triggered twice, which is the default behaviour.  

dragEnter: When you drag a node in the diagram, the getNodeDefaults function is triggered which allows you to customize the appearance of the preview node during the drag operation.  

drop: When you drop a node in the diagram, the getNodeDefaults function is triggered again. This time, it helps in defining the appearance of the dropped node after the drop operation has taken place. You can modify the node's properties based on the dropped element.  


Regards,

Gobinath



KA Kabe July 19, 2023 06:47 PM UTC

Oh I see! Glad I asked as I don't think I would have figure that out on my own. Thanks!



PR Preethi Rajakandham Syncfusion Team July 20, 2023 05:03 AM UTC

Hi Kabe,

You're welcome. We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help.

Regards,

Preethi R


Loader.
Up arrow icon