I have a question, which might be related to something that I have incorrectly configured in my diagram, because I cannot replicate the same behavior with the samples. What could possibly make PanningTool include DragSelectingTool.box into computation when panning the view?
I have this strange behavior, which I want to get rid off. When drag selecting a node and then releasing the mouse button, we can see that panning includes the box part of DragSelectingTool into calculations, because we cannot pan the view like in the initial conditions. Once you select and deselect a node by clicking on the diagram background, then you can pan the view like expected.
Using default DragSelectingTool makes it harder to replicate the described issue. I can only see somewhat similar behavior, if I am trying to auto scroll while using DragSelectingTool on the edge of Diagram.
PanningTool does not influence this issue, because with default and the one that I’m using I see the same behavior and logically thinking it should not influence anything because the only place changed was canStart method.
I’ve looked into “Tool” Layer after stopTool method and there were no Parts.
Somehow computeBounds of Diagram was still including box in documentBounds even if it’s invisible.
I’ve looked into how Diagram.computeBounds works and found, that parts which have isInDocumentBounds set to false are not included. So I have set this to false on RealTimeDragSelectingTool.boxPart and the issue is fixed now, box is still visible and Tool works as expected.
But this does not feel like the right solution at the moment. I’ll mark it anyways.