I am running into an issue where I want to double the size of the diagram bounds whenever the bounds of the diagram are changed/calculated. The reason for this is that I want to pan the view beyond the extents defined by the parts on the diagram. For example, I canâ€™t pan a node to the center of the diagram if it is in the upper-right corner of the diagram when a node is in the bottom-left corner.
Currently the only way to accomplish this is to zoom out and then pan the node to the center of the diagram. However, when I zoom back in it shifts back to the original position, constraining the pan. Is there anyway to set the diagram bounds dynamically to be double the calculated bounds?
I tried overriding diagram.computeBounds() with no success (I think it is stated in the API that you should not do this). I also tried working with the DocumentBoundsChanged event on the diagram, but my initial efforts were also unsuccessful. I also do not see anything helpful in the panningTool class.
I feel like I am missing somethingâ€¦ Thanks for your help!