archimatetool / archi

Archi: ArchiMate Modelling Tool
https://www.archimatetool.com
MIT License
927 stars 267 forks source link

More label positions for connectors #809

Closed Santeri-Salminen closed 2 years ago

Santeri-Salminen commented 2 years ago

Version of Archi

4.9.2

Archi Plug-ins

no

Operating System

Linux and Windows

Actual Behaviour

Currently there are only three positions for a label of a connector: in the middle, at source below the connector, or at target below the connector. Especially for the "middle" positioning this causes visibility problems when the text is as long as the connector and on top of it.

This issue is related to #334.

Expected Behaviour

I propose to have new label positions: below, over and above the selected point. In total, 9 options (the first 3 are the current ones):

  1. Source (below the connector)
  2. Middle (over the connector)
  3. Target (below the connector)
  4. Source (over the connector)
  5. Source (above the connector)
  6. Middle (below the connector)
  7. Middle (above the connector)
  8. Target (over the connector)
  9. Target (below the connector)

I have code changes for this already, ready for review. The order of the options is mixed because of backwards compatibility. The label positions are stored as indexes in the save files, so indexes 0-2 must remain the same as before to keep existing save files from changing unexpectedly.

Screenshot_20220201_090350

Phillipus commented 2 years ago

Thanks for the proposal. If you'd like to open a draft Pull Request, I could take a look at it.

(The ideal case would be to have free floating labels, but that's more difficult)

Santeri-Salminen commented 2 years ago

Floating labels would be nice, but a larger set of fixed positions could be sufficient for now. I created a PR: https://github.com/archimatetool/archi/pull/810