Dragging and dropping nodes

I am trying to add nodes to a diagram area using the symbol palette, by picking up shapes and dropping them. The shapes dont go inside the diagram area somehow when i try to drag them there. I am referring the events sample for this but nothing seems to work.

5 Replies 1 reply marked as answer

AR Aravind Ravi Syncfusion Team September 10, 2020 06:34 AM UTC

Hi Aditya, 

We have created a sample for the drag and drop the nodes from symbol palette to diagram. We suspect that you have dropped the symbol outside of diagram boundary so that nodes does not dropped in the diagram. Please find the below sample in which you can able to drag and drop the node from palette to diagram and events has been logged in right side property panel 


Regards 
Aravind Ravi 



SP Srinivas Pulla September 10, 2020 06:51 AM UTC

Hi Aravind,
I was referring the same code and using it but the shapes and connectors somehow dont go inside even when i drag them . I there a property of the diagram space which allows dropping external shapes. Also however barely inside they are i am not able to select and edit them. See the image for a better picture. They just get accumalated on one line.

Attachment: Screenshot_(56)_5f330ab9.zip


AR Aravind Ravi Syncfusion Team September 11, 2020 09:54 AM UTC

Hi Aditya, 
 
By default, in the symbol palette, we cannot able to edit the symbol like we do in diagram. We suspect that you do not refer theme for Syncfusion component in your sample. So that symbol palette does not render properly. Please refer the below theme in the index.html . So that symbol palette renders properly  
 
<link rel='nofollow' href=" https://cdn.syncfusion.com/ej2/material.css" rel="stylesheet" /> 
 
In case if the issue still persists, please share us a simple sample illustrating issue. This will help us to serve you better. 
 
Regards 
Aravind Ravi 



SP Srinivas Pulla September 11, 2020 10:37 AM UTC

Hi aravind , I added the css style reference now the palette is being rendered properly but the symbols and shapes still dont go inside the diagram space and are uneditable.I believe its something to do with the diagram properties.
Aditya


AR Aravind Ravi Syncfusion Team September 11, 2020 11:12 AM UTC

Hi Aditya,  
 
We does not have any specific property in symbol palette to allow drag and drop in diagram. We suspect that you set diagram constraints or diagram tools as None. So that you cannot able to drag and drop a node inside the symbol palette. If you set diagram constraints or tool as None means then change it to Default.  
 
public diagramcontraints: DiagramConstraints = DiagramConstraints.Default; 
 
    public tool: DiagramTools = DiagramTools.Default; 
 
In case if the issue still persists, please share us a simple sample illustrating issue. This will help us to provide solution at earlier. 
 
Regards 
Aravind Ravi 


Marked as answer
Loader.
Up arrow icon