Closed Santeri-Salminen closed 2 years ago
Thanks for the PR, it seems to be well organised.
I have some minor comments:
AbstractDiagramConnectionFigure.java
- remove the unnecessary import com.archimatetool.model.IProperty;
ArchiConnectionEndpointLocator
- no need to change Connection
to AbstractDiagramConnectionFigure
ArchiConnectionMiddleLocator
should be as in AbstractDiagramConnectionFigure
ArchiConnectionMiddleLocator
extends ConnectionLocator
but we use ArchiConnectionEndpointLocator
(replacement for ConnectionEndpointLocator
) for some cases and I'm wondering why we use that special class, and if the new ArchiConnectionMiddleLocator
might be missing something from it? @jbsarrodie ?
Hi,
(related to #809)
Well, before looking at this code proposal, I must admit that I'm not in favor of such change. Most of what you provide can be done by tuning the label expression (using some newlines or ${wordwrap}
for example). So I think this new set of choices make it more complex for the user in fact. IMHO, we should either stay are we are now (start | middle | end) or implement the real thing (movable label).
Hi,
(related to #809)
Well, before looking at this code proposal, I must admit that I'm not in favor of such change. Most of what you provide can be done by tuning the label expression (using some newlines or
${wordwrap}
for example). So I think this new set of choices make it more complex for the user in fact. IMHO, we should either stay are we are now (start | middle | end) or implement the real thing (movable label).
OK, that's a fair comment.
or implement the real thing (movable label).
As shared in some occasion, I think we could leverage note and label expression. It is already possible to create a note with transparent border and background, connect it to some concept, and use a label expression to display the name of the concept. We have almost all pieces needed to create movable labels. I think the only missing pieces are: being able to make the connection transparent, and have a way to reference the concept's label and not just the concept's name.
Thanks for the comments! My main driver was the Middle positioning because it's always on top of the connector, and effectively blocks the visibility of short connectors. Label expression doesn't help here (at least to my understanding) because the label has explicit background color instead of being transparent, so newlines will also hide the connector line.
I agree that my current proposal makes the drop-down menu too complex. What about having a separate drop-down menu just for vertical positioning? The current position menu would remain unchanged, and the new menu wouldn't need to be used at all if the default vertical positioning is ok. It could have options Default, Above, Center, and Below, for example.
Freely movable labels would be great, of course, but that's not something I'm able to implement.
Proposal for adding new connector label positions.