So I have seen these two examples of html drag and drop, where generally what is happening is a draggable html element is being dropped onto a diagram, and once the element is dropped, the element transforms into a gojs diagram node.
What I would like to be able to do, however, is to see if it is possible to have the html element immediately turn into a gojs node/shape upon entering the bounds of the diagram, not waiting until the draggable html element is “dropped”.
Is this possible? Maybe this could be done if there is an event for “entering” the diagram?
I don’t know how to customize either HTML drag-and-drop or jQuery drag-and-drop. I suggest that you search the web for clues about how to do what you want.
To be clear, my question is not about how to customize non-gojs libaries.
I am wondering if there is any event in gojs itself that can be triggered when a draggable item (dragged via whatever non-gojs library) enters the gojs diagram space.
When I look at the Diagram Events api, nothing looks promising.
Presumably those other drag-and-drop mechanisms have ways of doing exactly that-- detecting when they cross over a different HTML Element such as the Diagram’s HTML DIV Element.
Another idea…not sure how feasible it is, though:
what if you have your list of html items, and then once you click on the html element (outside the diagram) the html item becomes hidden and instead you create a mini-panel with one node on the fly?
I thought that was an option is some such systems. But I don’t really know. Again, I’ll say that customizing the drag-and-drop mechanisms of whatever software that you choose is not really relevant to GoJS. Except for where you might need to react to events within a Diagram, which requires coordinate system conversions.