Community
Participate
Working Groups
If I set a custom anchor in selfStyleConnection, then, zooming does not work properly. It seems that scaling is not applied to the coords the anchor is set to after zooming (in/out). I will append an example to reproduce this.
Created attachment 209892 [details] Example showing zooming not working properly when custom anchors used.
I had a look at what ChopboxAnchor, an existing subclass of AbstractConnectionAnchor does and it seems you need to translate the rectangle in your implementation of getLocation(). With this in getLocation(), your example zooms fine for me: Rectangle bounds = Rectangle.SINGLETON; bounds.setBounds(getOwner().getBounds()); getOwner().translateToAbsolute(bounds);