Dragging from palette and mouseDragEnter

Hi,

I’m trying to implement the following:
I have a palette with different kind of objects (with different categories).
When I drag something from the palette it might be possible to drop it over a node in my diagram. I want to show the user it’s possible by using different stroke colors.

The thing is that I can’t find a way to know within the mouseDragEnter handler what is the object I’m dragging.

In the examples it usually shows we use the diagram.selection, but I can’t use it here since it has been dragged from the palette and there is no selection in my diagram yet.

Any suggestions?

Thanks

Look at the diagram.toolManager.draggingTool.copiedParts or .draggedParts collections.

The Planogram sample demonstrates this, http://gojs.net/latest/samples/planogram.html , in its highlightGroup function.

That’s excellent.
It’s exactly what I was looking for!

Thank you!