Update node on before move

Hi

I have the next case:
2 nodes moved together (using computeEffectiveCollection)
one node is being moved, another node which move together has a min/maxLocation to limit it move area. After move is done i’m updating min/maxLocation, but also i need to unset min/maxLocation for node before move actually starts. I know how to handle “after” move but didnt find anything to handle “before” move.

Any ideas?

Thanks.
Vlad.

So you want to further customize the behavior of the DraggingTool. To do additional side effects before and after the drag, it’s easy to override the DraggingTool.doActivate and doDeactivate methods.

The results of the call to the DraggingTool.computeEffectiveCollection (which may also have been overridden in your code) are saved as the DraggingTool.draggedParts Map. If you override the DraggingTool.doActivate method and first call the super method, then you could modify the Nodes in that draggedParts Map.

If you override the DraggingTool.doDeactivate method, you can iterate over the Nodes in that draggedParts Map and then call the super method.

Thanks Walter!
Helpful as always, overriding doActivate does exactly what I need.