borkdominik / bigER

Entity Relationship Diagram modeling tool realized as a language server that is distributed as a VS Code extension.
https://marketplace.visualstudio.com/items?itemName=BIGModelingTools.erdiagram
MIT License
106 stars 13 forks source link

Improve label positioning #18

Closed Aksem closed 2 years ago

Aksem commented 2 years ago

Before: image

After: image

Two problems with label positioning were solved:

  1. Sprotty can place labels on the left side from the vertical edge segment, labels can be long(one word) and as result, they are over edges(e.g. 'Exam' label on the first screenshot). Solution: custom EdgeLayoutPostprocessor which places labels on the right side from the vertical edge segment.

  2. If the center of an edge is on a small edge segment and the label is placed near it, we get the label over the edge again (see 'Work' label on the first screenshot). Solution: updated sprotty-router-libavoid to 1.0.36, it supports minimalSegmentLengthForChildPosition parameter and is 20 by default.