Moving a selection: viewport has to move with mous

Hi!



When I move some selected nodes out of the viewport, the viewport should move too.

eg. I select a node and move it to the left outside the bounds of the diagram. Right now the viewport just stays where it is. But the viewport should move also to the left when I come near to the left border of the diagram.



Is there already somewhere a property with such a purpose? If not: Where´s the best place to add this behavior? Override DraggingTool.MoveParts?



Thanks!

Lukas

If you move the selection with the mouse just inside the edge of the Diagram, it will automatically scroll in that direction.

The area where autoscroll happens is controlled by the DiagramPanel.AutoScrollRegion.

Dragging outside of the Diagram must be interpreted as a drag-and-drop to another control when Diagram.AllowDragOut is true. I suppose it could be interpreted as another way to autoscroll when AllowDragOut is false, but that’s not the currently defined behavior.

If you want to implement it, I suggest you override DiagramPanel.ComputeAutoScrollPosition. (I haven’t actually tried this for the situation you are proposing.)

Thanks Walter.

I didn´t see DiagramPanel.AutoScrollRegion. I increased AutoScrollRegion and it works fine now.

Thanks.

Lukas