rete icon indicating copy to clipboard operation
rete copied to clipboard

Drag and Drop issue

Open abinfirmusoft opened this issue 4 months ago • 4 comments

I am looking for the functionality to apply drag and drop nodes from an svg icon from out of the canvas. Can anyone provide an idea of code that helps in implementing the above functionality.

abinfirmusoft avatar Feb 19 '24 13:02 abinfirmusoft

I think you might get some helpful code/inspiration from the "dock" plugin.

arthurwolf avatar Feb 21 '24 12:02 arthurwolf

Already tried the dock plugin feature, but the results came out as like the image below and it looks weird. I need to add some more nodes and this feature is not applicable for that. I am planning to create a box outside the canvas and add svg icons in it. and whenever I drag the svg's to the canvas, a node should get created gh as like in the image

abinfirmusoft avatar Feb 21 '24 12:02 abinfirmusoft

I don't mean use the dock plugin itself, I mean look at the source code of the dock plugin to see how it handles drag and drop. Last time I looked at that repository it looked fairly straightforward, so I expect you can use that code as inspiration to implement what you need.

By the way, I need to do exactly what you're trying to do (a "toolbox" with icons, and when you drag and drop an icon it creates a new node). I plan to implement it as a rete plugin/module (like dock). Maybe we could collaborate on that.

arthurwolf avatar Feb 21 '24 12:02 arthurwolf

Yeah, will update here once I cracked it.

abinfirmusoft avatar Feb 21 '24 12:02 abinfirmusoft

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

rete-js[bot] avatar Mar 24 '24 01:03 rete-js[bot]

This issue was closed because it has been stalled for 10 days with no activity.

rete-js[bot] avatar Apr 07 '24 01:04 rete-js[bot]