@yuneta/gobj-ui 7.23.83 → 7.23.85

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 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
- Ctrl/Meta wheel) and `zoom-canvas` takes `trigger: ['Control']`.
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 larger of one step out from the ring before and
1321
- the length its cards need side by side. A fan that cannot overlap by
1322
- construction; several roots share the circle around an empty centre.
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
@@ -1364,6 +1374,20 @@ screen every card is a smudge. Since `7.23.82` a record has **three views**
1364
1374
  popover's own scope: this node, the topic, every node), remembered as the
1365
1375
  topic's default and saved per node in `__graphs__` as `node_shape`.
1366
1376
 
1377
+ **The colours are remembered the same way** (since `7.23.85`): `apply` writes
1378
+ `fill`, `stroke` and `lineWidth` into the node's entry in `__graphs__` — and
1379
+ into the topic's defaults for the wider scopes — and the three views read
1380
+ them back through one `node_paint_of()`, while every repaint takes the colour
1381
+ from the style the node is wearing rather than from `desc.color`. Before
1382
+ that, the colour lived on the live style alone, which on an html card is
1383
+ UNDER the html: the first repaint (a selection, the focus, a theme switch, a
1384
+ pill appearing) rebuilt that html from the topic's colour and the choice was
1385
+ gone, and nothing of it ever reached the store. Choosing the topic's own
1386
+ colour back, with the stroke and line width that go with it, **forgets** the
1387
+ entry instead of writing it: the palette is assigned by position, so a
1388
+ colour written down would freeze today's palette on that card — the trap the
1389
+ sizes fell into in `7.23.80`.
1390
+
1367
1391
  In the view's toolbar (`C_YUI_TREEDB_GRAPH`), next to the fold pair: three
1368
1392
  push buttons in one group — a card, a line, a figure — the pressed one being
1369
1393
  the view that is on (`full` / `compact` / `shape`, persisted as `node_mode`;
@@ -1411,11 +1435,19 @@ where a port's `shape` picks the G shape by the names G6 registers itself:
1411
1435
  `circle`, `square`, `diamond`, `triangle`. `r` stays the one size (the
1412
1436
  half-side of the square, the half-diagonal of the diamond), and the hit test,
1413
1437
  the resize handles and the edge's landing point read `r` and none of them care
1414
- about the outline. A selected port shows a gear beside it, as the node does
1438
+ about the outline; the HIT TEST does, since `7.23.84` — a circle around a
1439
+ diamond answers for the air off its corners while missing the middle of its
1440
+ edges — so the distance ranks two overlapping ports and the shape says which
1441
+ are in the running. A selected port shows a gear beside it, as the node does
1415
1442
  (under the link icon on an fkey); it opens the **port properties** popover —
1416
1443
  shape, radius, and the scope: *this port*, *the same port of every card of
1417
1444
  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. The choice is remembered
1445
+ preview on the port and a cancel that puts it back — and since `7.23.84` any
1446
+ other way out puts it back too: the undo is kept beside the popover and run
1447
+ by whoever hides it (a click on the canvas, the icon pressed again, the
1448
+ element going away), because a preview is not the reader's answer until
1449
+ `apply` is pressed. The same for the node and edge popovers. The choice is
1450
+ remembered
1419
1451
  as the topic's default (`port_shapes[key]` / `port_shape`, beside
1420
1452
  `port_sizes` / `portR`), so a card that arrives later is born with it, and
1421
1453
  saved per node in `__graphs__` as `port_shapes`. On a touch screen the port's
@@ -1483,6 +1515,14 @@ forwards them as `EV_SET_HIDDEN_TOPICS`, `EV_SET_MAIN_TOPIC`,
1483
1515
  `main topic`, `highlight topic`, `loose records`, `hidden topics`; `legend`
1484
1516
  is no longer used.
1485
1517
 
1518
+ **The strip is repainted on a language change** (`7.23.84`): its chips are
1519
+ drawn on `EV_LEGEND_STATE`, which arrives after a reconcile and not when the
1520
+ language changes, and a chip's title says an ACTION that depends on the
1521
+ state — so the view subscribes to the shell's `EV_LANGUAGE_CHANGED` and
1522
+ redraws the strip and the find box's counted line. The keys travel in the
1523
+ DOM as well (`data-i18n-title`, `data-i18n-aria-label`), so
1524
+ `refresh_language()` reaches the titles even before the repaint.
1525
+
1486
1526
  ### C_YUI_TREEDB_SCHEMA — the treedb drawn the way its `.c` draws it
1487
1527
 
1488
1528
  A landing view that draws a treedb the way its schema literal draws it in ASCII