We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to capture event when the user drags a shape to the diagram space

Thread ID:





148734 Nov 1,2019 06:05 AM UTC Nov 4,2019 09:34 AM UTC Angular - EJ 2 5
Tags: Diagram
Asked On November 1, 2019 06:09 AM UTC

I am trying to create a flowchart and allowing the user to continue the remaining flowchart.

I have given option to drag and drop the shapes in the diagram space

how will i capture the event when he drags a shape

reffered below

Please do help me

Naganathan Ganesh Babu [Syncfusion]
Replied On November 1, 2019 09:32 AM UTC

Hi SaiSravya, 

We suggest you to use diagram’s “dragEnter” events to find the node to drag to the diagram space. Also, use dragEnter evtArgs “Cancel” property to cancel the node to adding into the diagram space. Please refer to the below our online UG documentation link and sample. 

Online UG documentation link: 

If we misunderstood your requirement, please share us more information about your requirement probably a video/screenshot of the requirement, which will help us to analyze further and provides a better solution. 


Naganathan K G 

Replied On November 1, 2019 10:04 AM UTC

Could you please send me some examples for the link you have provided?

Shyam G [Syncfusion]
Replied On November 4, 2019 04:24 AM UTC

Hi SaiSravya,  
Please look into the below code example to define dragEnter event. This event triggers when a dragged node from palette with mouse enters a diagram. 
Code example: 
<ejs-diagram #diagram id="diagram" width="100%" height="700px" (dragEnter)='dragEnter($event)'  (created)="diagramCreate()" [nodes]="nodes">  
public dragEnter(args: IDragEnterEventArgs): void {  
 // do your own logic 
Shyam G 

Replied On November 4, 2019 05:26 AM UTC

I am facing issue with the styling part which is from OpenNew.css 

I couldnt find that file in the code which you have shared

Kindly let me know from where i can get..

Thanks much for helping us

Attachment: error_8849fb0d.rar

Shyam G [Syncfusion]
Replied On November 4, 2019 09:34 AM UTC

Hi SaiSravya,  
Sorry for the inconvenience. 
The OpenNew.css file is not needed for our diagram component. So we have removed it from our sample. Please refer to a modified sample below. 
Shyam G 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon