Community
Participate
Working Groups
If a text decorator is added to a connection, user can move the text decorator around. This is a nice feature. But it seems the user is given too much freedom here. The text decorator can be moved very far away from the connection and this could be misleading. If fact, the text decorator for one connection could be mis-regarded as another connection's decorator. We should limit the text decorator movement so that it always stays close to the connection.
I would see a functionality like this rather at tool level. The tool developer can implement a restriction like this inside his own subclass of DefaultMoveBendpointFeature. This is especially true if one considers that I would find it rather hard to define a general limit for the distance that is valid accross all tools, as it would be necessary if we implement this inside the Graphiti framework. Just let me know if you have a different opinion on this.
(In reply to comment #1) > I would see a functionality like this rather at tool level. The tool developer > can implement a restriction like this inside his own subclass of > DefaultMoveBendpointFeature. > This is especially true if one considers that I would find it rather hard to > define a general limit for the distance that is valid accross all tools, as it > would be necessary if we implement this inside the Graphiti framework. > Just let me know if you have a different opinion on this. That's a reasonable approach. I just experimented with my move connection decorator feature and if I return "false" in canMoveConnectionDecorator method, then the decorator won't be moved. How could I access the coordinates of the connection polyline? Thanks!
The Polyline object has a list of its bendpoints (getPoints() method). Each point can be queried for its x and y coordinates.