Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic drag and drop the node between two diffrent broser windows (Read 1433 times)
Shafi
Full Member
***
Offline


I Love MindFusion!

Posts: 109
Joined: Nov 8th, 2016
drag and drop the node between two diffrent broser windows
Mar 27th, 2018 at 1:37pm
Print Post  
Can you please give us good solution which support the drag and drop the node between two diffrent broser windows
Please have a look at the code.
As i am able to upload whole project because over here maximum size file is 300 KB only.
To run this attached project
1. You need to extract all three zip.
2. Run npm install in Angular2_mindfusion_example folder
3. Copy the files from folder name "extract_it_in_assets_mindfusion"  and paste it in "Angular2_Mindfusion_example\src\assets\mindfusion"
4. As i am using attached diagram library please copy and paste it in node_modules
5. Now try  run by npm start
6. You can see the result here  http://localhost:4200/


Here problem is that am not able to select the node and whole canvas is getting dragged.
  

library_001.zip ( 200 KB | 152 Downloads )
Angular2_Mindfusion_example_001_001.zip ( 164 KB | 126 Downloads )
Drag_Drop_two_windows.PNG ( 52 KB | 138 Downloads )
Drag_Drop_two_windows.PNG
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: drag and drop the node between two diffrent broser windows
Reply #1 - Mar 28th, 2018 at 7:33am
Print Post  
Hi,

To see a working example of drag/drop and JsDiagram, check out the DragDrop sample, included with product. It uses the native HTML5 drag and drop support and works between separate browser windows too.

To enable dragging, the diagram should be temporarily disabled, as otherwise it would consume the mouse input. Next, you should handle the canvas' ondragstart, ondragover and ondrop events to initiate and complete the data transfer.

The sample shows all the above steps as well as a way to create a indicator image for the dragged node, too.

Regards,
Lyubo
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint