Merge pull request #447 from gavin-ts/outside-connection-label-masking
render: outside connection label masking
This commit is contained in:
commit
fffb08a250
2 changed files with 3 additions and 0 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
#### Improvements 🧹
|
#### Improvements 🧹
|
||||||
|
|
||||||
- Display version on CLI help invocation [#1400](https://github.com/terrastruct/d2/pull/1400)
|
- Display version on CLI help invocation [#1400](https://github.com/terrastruct/d2/pull/1400)
|
||||||
|
- Improved readability of connection labels when they overlap another connection. [#447](https://github.com/terrastruct/d2/pull/447)
|
||||||
|
|
||||||
#### Bugfixes ⛑️
|
#### Bugfixes ⛑️
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -516,6 +516,8 @@ func drawConnection(writer io.Writer, labelMaskID string, connection d2target.Co
|
||||||
|
|
||||||
if label.Position(connection.LabelPosition).IsOnEdge() {
|
if label.Position(connection.LabelPosition).IsOnEdge() {
|
||||||
labelMask = makeLabelMask(labelTL, connection.LabelWidth, connection.LabelHeight, 1)
|
labelMask = makeLabelMask(labelTL, connection.LabelWidth, connection.LabelHeight, 1)
|
||||||
|
} else {
|
||||||
|
labelMask = makeLabelMask(labelTL, connection.LabelWidth, connection.LabelHeight, 0.75)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue