@yuneta/gobj-ui 7.23.83 → 7.23.84
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/README.md +33 -7
- package/dist/gobj-ui.cjs.js +203 -67
- package/dist/gobj-ui.es.js +203 -67
- package/package.json +1 -1
- package/src/c_g6_nodes_tree.js +162 -38
- package/src/c_yui_treedb_graph.js +59 -3
- package/src/treedb_layout.js +55 -16
- package/src/treedb_layout.test.js +15 -0
package/README.md
CHANGED
|
@@ -842,8 +842,13 @@ looked at from afar or read through a keyhole — never scrolled, which is what
|
|
|
842
842
|
a wheel does on a map and on every page. Shift + wheel scrolls sideways, a
|
|
843
843
|
trackpad pinch arrives as Ctrl + wheel and keeps zooming, and the two-finger
|
|
844
844
|
pinch on a touch screen is [our own](#the-graphs-on-a-touch-screen). G6's
|
|
845
|
-
`scroll-canvas` takes the plain wheel (its `enable` stands aside for a
|
|
846
|
-
|
|
845
|
+
`scroll-canvas` takes the plain wheel (its `enable` stands aside for a Ctrl
|
|
846
|
+
wheel) and `zoom-canvas` takes `trigger: ['Control']`. **One key, named the
|
|
847
|
+
same on both sides**: the scroll used to stand aside for Meta as well, so
|
|
848
|
+
Cmd + wheel on a Mac neither scrolled nor zoomed (`7.23.84`). It cannot be
|
|
849
|
+
both keys, either — a G6 `trigger` is a CHORD, not a list of alternatives:
|
|
850
|
+
`Shortcut.match()` compares the keys held to the keys bound as a SET, so
|
|
851
|
+
`['Control', 'Meta']` would mean both at once.
|
|
847
852
|
|
|
848
853
|
`C_G6_NODES_TREE` floats a vertical toolbar over the canvas:
|
|
849
854
|
|
|
@@ -1317,9 +1322,14 @@ layouts by two thin adapters in `c_g6_nodes_tree.js`:
|
|
|
1317
1322
|
list that indents is a JSON viewer, and this library already has one.
|
|
1318
1323
|
- **`radial`** (`treedb-radial`) — the root in the middle, a ring per depth,
|
|
1319
1324
|
every subtree an angular **sector** proportional to its leaves, and the
|
|
1320
|
-
radius of each ring the
|
|
1321
|
-
the length its cards need side by side
|
|
1322
|
-
|
|
1325
|
+
radius of each ring the largest of three: one `ranksep` out from the ring
|
|
1326
|
+
before, the length its cards need side by side, and (since `7.23.84`) far
|
|
1327
|
+
enough for each card to clear the one it HANGS FROM — `ranksep` is a step
|
|
1328
|
+
between CENTRES, so 180 between two cards that reach ~95 each way is two
|
|
1329
|
+
cards touching, where the tidy tree's `ranksep` is a gap between COLUMNS
|
|
1330
|
+
and a column carries its own width. A fan that cannot overlap by
|
|
1331
|
+
construction, across the ring or along the radius; several roots share the
|
|
1332
|
+
circle around an empty centre.
|
|
1323
1333
|
|
|
1324
1334
|
Both take the **same spanning tree**, chosen deterministically: roots are the
|
|
1325
1335
|
nodes with no incoming edge, in node order; a node belongs to the **first
|
|
@@ -1411,11 +1421,19 @@ where a port's `shape` picks the G shape by the names G6 registers itself:
|
|
|
1411
1421
|
`circle`, `square`, `diamond`, `triangle`. `r` stays the one size (the
|
|
1412
1422
|
half-side of the square, the half-diagonal of the diamond), and the hit test,
|
|
1413
1423
|
the resize handles and the edge's landing point read `r` and none of them care
|
|
1414
|
-
about the outline
|
|
1424
|
+
about the outline; the HIT TEST does, since `7.23.84` — a circle around a
|
|
1425
|
+
diamond answers for the air off its corners while missing the middle of its
|
|
1426
|
+
edges — so the distance ranks two overlapping ports and the shape says which
|
|
1427
|
+
are in the running. A selected port shows a gear beside it, as the node does
|
|
1415
1428
|
(under the link icon on an fkey); it opens the **port properties** popover —
|
|
1416
1429
|
shape, radius, and the scope: *this port*, *the same port of every card of
|
|
1417
1430
|
the topic* (the hook or fkey column), or *every port there is* — with a live
|
|
1418
|
-
preview on the port and a cancel that puts it back
|
|
1431
|
+
preview on the port and a cancel that puts it back — and since `7.23.84` any
|
|
1432
|
+
other way out puts it back too: the undo is kept beside the popover and run
|
|
1433
|
+
by whoever hides it (a click on the canvas, the icon pressed again, the
|
|
1434
|
+
element going away), because a preview is not the reader's answer until
|
|
1435
|
+
`apply` is pressed. The same for the node and edge popovers. The choice is
|
|
1436
|
+
remembered
|
|
1419
1437
|
as the topic's default (`port_shapes[key]` / `port_shape`, beside
|
|
1420
1438
|
`port_sizes` / `portR`), so a card that arrives later is born with it, and
|
|
1421
1439
|
saved per node in `__graphs__` as `port_shapes`. On a touch screen the port's
|
|
@@ -1483,6 +1501,14 @@ forwards them as `EV_SET_HIDDEN_TOPICS`, `EV_SET_MAIN_TOPIC`,
|
|
|
1483
1501
|
`main topic`, `highlight topic`, `loose records`, `hidden topics`; `legend`
|
|
1484
1502
|
is no longer used.
|
|
1485
1503
|
|
|
1504
|
+
**The strip is repainted on a language change** (`7.23.84`): its chips are
|
|
1505
|
+
drawn on `EV_LEGEND_STATE`, which arrives after a reconcile and not when the
|
|
1506
|
+
language changes, and a chip's title says an ACTION that depends on the
|
|
1507
|
+
state — so the view subscribes to the shell's `EV_LANGUAGE_CHANGED` and
|
|
1508
|
+
redraws the strip and the find box's counted line. The keys travel in the
|
|
1509
|
+
DOM as well (`data-i18n-title`, `data-i18n-aria-label`), so
|
|
1510
|
+
`refresh_language()` reaches the titles even before the repaint.
|
|
1511
|
+
|
|
1486
1512
|
### C_YUI_TREEDB_SCHEMA — the treedb drawn the way its `.c` draws it
|
|
1487
1513
|
|
|
1488
1514
|
A landing view that draws a treedb the way its schema literal draws it in ASCII
|