Skip to content

How to drag and drop an item from a view to the diagram #555

Answered by planger
shinesamjacob asked this question in General
Discussion options

You must be logged in to vote

There is no generic base implementation for DnD from other views outside of the diagram, because those other views define their custom transfer objects. However, you can of course implement that based on plain browser technologies; we've done that in a customer project.

Roughly speaking, you need to put your custom object into the data transfer from the drag source and react to the drop event on the diagram element and process your transfer object. Most of it is not really GLSP-specific but more related to HTML drag and drop. The GLSP specific thing is then just to dispatch a GLSP action on drop of your object.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tortmayr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants