@graphlearning/graphl-flow 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +566 -557
- package/dist/index.js.map +1 -1
- package/dist/routing.d.ts +13 -0
- package/package.json +1 -1
package/dist/routing.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ export interface Routed {
|
|
|
23
23
|
side: 'on' | 'before' | 'after';
|
|
24
24
|
seg: 'h' | 'v';
|
|
25
25
|
};
|
|
26
|
+
/** How many edges hold a slot in this edge's channel (0: none). The layout widens the gap for them. */
|
|
27
|
+
slots: number;
|
|
26
28
|
}
|
|
27
29
|
/** An edge ends this far OUTSIDE its node, so the arrowhead never touches the border. */
|
|
28
30
|
export declare const ANCHOR_OUTSET = 4;
|
|
@@ -30,6 +32,17 @@ export declare const ANCHOR_OUTSET = 4;
|
|
|
30
32
|
export declare const PORT_INSET = 12;
|
|
31
33
|
/** Two ports closer than this on one face make the whole face spread evenly. */
|
|
32
34
|
export declare const PORT_MIN_GAP = 14;
|
|
35
|
+
/** The arrowhead's length (its marker is 10 user units): a slot keeps at least this run to each anchor. */
|
|
36
|
+
export declare const HEAD_LEN = 10;
|
|
37
|
+
/** Between two slots in one channel. */
|
|
38
|
+
export declare const SLOT_GAP = 8;
|
|
39
|
+
/**
|
|
40
|
+
* The gap a channel needs for `n` slots: a full head's run at each end, outside each anchor, and
|
|
41
|
+
* SLOT_GAP between neighbours. One slot needs 28 — inside EDGE_GAP — so only a SHARED channel grows.
|
|
42
|
+
* Without it, three arrows fanning into one node through a 32px gap left a 4px last run, which the
|
|
43
|
+
* 6px head trim reversed: the arrowhead pointed back into the gap (0.2, edge-fan-in).
|
|
44
|
+
*/
|
|
45
|
+
export declare const slotRoom: (n: number) => number;
|
|
33
46
|
/**
|
|
34
47
|
* `sides[i]` names the two SIBLINGS edge i runs between — the children of its lowest common
|
|
35
48
|
* ancestor that contain each end. The faces are chosen from THEIR boxes, not the nodes': two nested
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphlearning/graphl-flow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Declarative diagram engine — authors describe groups, items and edges; the browser lays them out and the engine draws the edges.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|