Skip to content

Commit 51a8b74

Browse files
Merge branch 'orthogonal-edges'
2 parents d849703 + c3e62ae commit 51a8b74

17 files changed

Lines changed: 884 additions & 638 deletions

File tree

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
- Changed: `<line>` based connectors are now axis-aligned by default where
11+
there is overlap in one dimension between the start and end elements. The new
12+
behaviour is equivalent to the previous `edge-type="h"` (or `="v"` as
13+
appropriate) in cases where the connector will meet both elements, and
14+
`edge-type` is now ignored and deprecated (it is currently removed from the
15+
rendered output to preserve output, but this special-casing will be removed
16+
in the future). If the elements do not 'overlap' in either dimension, the
17+
connection will be a straight line between the closest corners; in the event
18+
that the two elements overlap in _both_ dimensions (i.e. intersect) then no
19+
connecting line is rendered. This new behaviour applies only if a bare elref
20+
is provided (e.g. `start="#ref"` or `="^"`); if a locspec is also given then
21+
the previous behaviour remains, and no change is made to the elbow connectors
22+
generated from `<polyline>` elements.
23+
1024
- Added: new config option 'error-mode' with values 'strict' (default, as
1125
previous behaviour), 'ignore' (leaves erroneous elements as provided in the
1226
input) and 'warn' (inserting a comment prior to the errored element with the

docs/mdbook/src/reference/attribute-ref.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,6 @@ Example:
171171
<line start="#abc" end="#pqr" />
172172
```
173173

174-
### `edge-type`
175-
176-
TODO
177-
178174
### `corner-offset`
179175

180176
TODO

examples/containment.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
<rect id="yproc2" xy="#group|v 2" text="process 2" wh="^"/>
2424
<rect id="yout" xy="#yproc2|v 2" text="out" wh="^"/>
2525

26-
<polyline start="#o3@r" end="#o4" edge-type="h"/>
26+
<line start="#o3" end="#o4"/>
2727
<polyline start="#out@r" end="#yinp@t"/>
2828
</svg>

examples/edges.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@
4444
<rect xy="5 40" wh="20 5" text="d" id="d"/>
4545
<rect xy="-5 15" xy-loc="tr" wh="10 30" text="e" id="e"/>
4646
<rect xy="-5 10" xy-loc="r" wh="10 5" text="f" id="f"/>
47-
<line end="#a" start="#base" edge-type="h" marker-end="url(#arrow)"/>
48-
<line end="#b" start="#base" edge-type="h" marker-end="url(#arrow)"/>
49-
<line end="#c" start="#base" edge-type="h" marker-end="url(#arrow)"/>
50-
<line end="#d" start="#base" edge-type="v" marker-end="url(#arrow)"/>
51-
<line end="#e" start="#base" edge-type="h" marker-end="url(#arrow)"/>
52-
<line end="#f" start="#base" edge-type="h" marker-end="url(#arrow)"/>
47+
<line end="#a" start="#base" marker-end="url(#arrow)"/>
48+
<line end="#b" start="#base" marker-end="url(#arrow)"/>
49+
<line end="#c" start="#base" marker-end="url(#arrow)"/>
50+
<line end="#d" start="#base" marker-end="url(#arrow)"/>
51+
<line end="#e" start="#base" marker-end="url(#arrow)"/>
52+
<line end="#f" start="#base" marker-end="url(#arrow)"/>
5353
<use href="#zero-marker" x="0" y="0"/>
5454
</svg>

examples/flow.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
<rect id="effect" xy="#base|V 20" wh="20 8" text="effect" class="d-fill-darkmagenta"/>
1010

11-
<line start="#send" end="#effect" edge-type="v" class="d-arrow d-dash"/>
12-
<line start="#effect" end="#return" edge-type="v" class="d-arrow d-dash"/>
11+
<line start="#send" end="#effect" class="d-arrow d-dash"/>
12+
<line start="#effect" end="#return" class="d-arrow d-dash"/>
1313

1414
<polyline points="#in@l, #in@r, #send@b, #send@t, #effect@c, #return@t, #return@b, #out@l, #out@r"
1515
dxy="1 3" class="d-arrow d-hardshadow d-blue d-thin"/>

examples/functional_block_diagram.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<polyline start="#prgp@l" end="#ace@l:75%" corner-offset="8" text="p,q,r" text-loc="br" class="d-arrow"/>
1919
<polyline start="#srgp@l" end="#ace@l:50%" corner-offset="14" text="p,q,r" text-loc="br" class="d-arrow"/>
20-
<line start="#as" end="#ace" edge-type="h" class="d-arrow"/>
20+
<line start="#as" end="#ace" class="d-arrow"/>
2121

2222
<polyline start="#ppi@t" end="#ace@b" corner-offset="70%" class="d-arrow"/>
2323
<polyline start="#ppi" end="#srgp@r" class="d-arrow"/>

0 commit comments

Comments
 (0)