d2
d2 copied to clipboard
render: outside connection label masking
Summary
We only added label masks when the label is placed over the connection, but when TALA places labels above or below connections the labels could still overlap other connections at times. This fixes the issue by always adding label masks so that even if the label is over part of another connection the mask will still be applied for improved legibility.
Details
- fixes #414
- fixes
.got.svgfiles being deleted when running./ci/e2ereport.sh - currently only TALA places labels in outside positions so we don't have any e2e tests that would reproduce this
fabricated example where the 111111 label is in an outside position with a mask over another connection
I'm not sure.. This seems to make the label ambiguous, as it can be from any edge. Previously, if the label was over an edge I knew it wasn't related to that edge at all.
I'm not sure.. This seems to make the label ambiguous, as it can be from any edge. Previously, if the label was over an edge I knew it wasn't related to that edge at all.
If we need to make the association of outside connection labels clearer that sounds like a separate but related issue to work on. This is solving the legibility of the text itself. I don't think we want to use the fact that the connection can be seen through the text as a way to reason that the label does not belong to that particular connection.
Updated the screenshot to show the full example, not just the zoomed in portion and it is clearer which connection the label belongs to.
I get it and I agree that it is more about positioning then the mask.
Though, in this example it is not that clear that the label is from the left edge and then 111 is masked but 222 isn't, so..
Can you provide some larger examples, with more edges and other overlaps so that we know how it would look like?
with #1383 I think this can have the same behavior as outside shape labels: