- Home
- Forum
- Angular - EJ 2
- How to capture event when the user drags a shape to the diagram space
How to capture event when the user drags a shape to the diagram space
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
SIGN IN To post a reply.
5 Replies
NG
Naganathan Ganesh Babu
Syncfusion Team
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.
Regards,
Naganathan K G
SA
SaiSravya
November 1, 2019 10:04 AM UTC
Could you please send me some examples for the link you have provided?
SG
Shyam G
Syncfusion Team
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">
</ejs-diagram>
public dragEnter(args: IDragEnterEventArgs): void {
// do your own logic
}
|
Regards,
Shyam G
SA
SaiSravya
November 4, 2019 05:26 AM UTC
I am facing issue with the styling part which is from OpenNew.css
Attachment: error_8849fb0d.rar
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
SG
Shyam G
Syncfusion Team
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.
Regards,
Shyam G
SIGN IN To post a reply.
- 5 Replies
- 3 Participants
-
SA SaiSravya
- Nov 1, 2019 06:05 AM UTC
- Nov 4, 2019 09:34 AM UTC