How to provide feedback to user on where drop is authorized

Hello,

I am looking for a proper way to provide feedback on where a drag & drop is authorized prior to actually drop the item.

As far as i can see, the memberValidation of groups is not called by the DraggingTool during drag and entering the group. We obviously only have mouseDragEnter/mouseDragLeave event handlers in group to handle this and explicitely call the memberValidation there. The DraggingTool seems to not use the nodropCursor ?

Is there a clean way to possibly change the cursor of the dragging tool when entering a group ?

Any other idea ?

Best regards,

JC

You have a lot of options, but our samples mostly change colors and edit the cursor to "not-allowed" (which is the same as no-drop on some platforms)

For example in the Planogram Editor Sample:

mouseDragEnter: (e, node) => {
  e.handled = true;
  node.findObject('SHAPE').fill = 'red';
  e.diagram.currentCursor = 'not-allowed';
  highlightGroup(node.containingGroup, false);
},
mouseDragLeave: (e, node) => node.updateTargetBindings(),

We edit the cursor and additionally change the offending object (the reason you cannot drop there in this case) to red temporarily.