@yuneta/gobj-ui 7.23.65 → 7.23.66
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 +55 -0
- package/dist/gobj-ui.cjs.js +1316 -182
- package/dist/gobj-ui.es.js +1316 -182
- package/package.json +1 -1
- package/src/c_g6_nodes_tree.js +1185 -254
- package/src/c_yui_treedb_graph.js +38 -0
- package/src/treedb_fold_model.js +592 -0
- package/src/treedb_fold_model.test.js +308 -0
package/README.md
CHANGED
|
@@ -1208,6 +1208,61 @@ Wiring: the box sends `EV_FIND_NODES {text}` to the view, which forwards it to
|
|
|
1208
1208
|
`C_G6_NODES_TREE`; the graph answers `EV_FIND_RESULT {term, matches}`, which the
|
|
1209
1209
|
view declares like every other event its child publishes.
|
|
1210
1210
|
|
|
1211
|
+
### The graph opens FOLDED, like a JSON viewer
|
|
1212
|
+
|
|
1213
|
+
A treedb drawn whole is a pile. A nave with a hundred and forty devices was a
|
|
1214
|
+
**row of a hundred and forty cards** under one parent, the edges to them a band
|
|
1215
|
+
of parallel lines, and a 6400-record treedb took every one of those records
|
|
1216
|
+
through a DOM card before the first pixel appeared. So the graph now reads the
|
|
1217
|
+
treedb the way a JSON viewer reads a document: **a tree by its hooks**, opened
|
|
1218
|
+
a level or two, with a count on every cut.
|
|
1219
|
+
|
|
1220
|
+
- **Every record is fetched, only the visible ones become G6 nodes.** The
|
|
1221
|
+
arithmetic lives in `treedb_fold_model.js` (pure, no G6, tested): the roots
|
|
1222
|
+
are the records with no drawable parent, a node's children are the records
|
|
1223
|
+
whose fkey names it through a hook, and a node is visible when a visible
|
|
1224
|
+
parent shows it or it is a shown root — the **union**, so a device that hangs
|
|
1225
|
+
from its place AND its controller is drawn once, under whichever opened
|
|
1226
|
+
first, and folding one of the two leaves it where the other shows it.
|
|
1227
|
+
- **`expand_depth`** (default `2`) is how much opens on load: the roots and
|
|
1228
|
+
their children. **`fold_page_size`** (default `24`) is how many children of
|
|
1229
|
+
one hook are shown at a time; the rest is a **`+N` chip** at the end of the
|
|
1230
|
+
page that opens the next one. Both are attrs of `C_YUI_TREEDB_GRAPH`,
|
|
1231
|
+
forwarded to the engine.
|
|
1232
|
+
- **A pill per hook on the card** — `▸ devices 142` folded, `▾ devices 24/142`
|
|
1233
|
+
open on a page — in the colour of the child topic, the same colour its hook
|
|
1234
|
+
port wears. Tapping it opens or folds that hook, and the card stays where it
|
|
1235
|
+
was on screen while the layout moves everything else (`yui_graph_place_at`).
|
|
1236
|
+
The pills are inside the card's `innerHTML`, so their click is delegated from
|
|
1237
|
+
the container in the capture phase over four event types, exactly as the
|
|
1238
|
+
JSON graph's fold handles are — G6 never reads the DOM `click`, it builds its
|
|
1239
|
+
own from the pointer pair.
|
|
1240
|
+
- **The toolbar's fold pair** (the same two chevrons as the JSON graph):
|
|
1241
|
+
*expand all* opens every hook on all its children — the reader asking for
|
|
1242
|
+
the pile on purpose — and *collapse all* leaves the roots. *Refresh* is the
|
|
1243
|
+
way back to the default depth.
|
|
1244
|
+
- **`dagre` reads LEFT TO RIGHT** now, with explicit `nodesep`/`ranksep`: the
|
|
1245
|
+
children of a node are a column beside it and the graph reads like a file
|
|
1246
|
+
tree. The ports move to the sides with it (fkeys on the left edge, hooks
|
|
1247
|
+
spread along the right one) and the edges are horizontal beziers;
|
|
1248
|
+
`antv-dagre` keeps the top-down reading, so the layout picker is also the
|
|
1249
|
+
direction picker. A layout change turns the ports of every card in place.
|
|
1250
|
+
- **The find and the topic focus search the RECORDS**, not the cards, and open
|
|
1251
|
+
the path down to what they find — at most one **page** of hidden matches
|
|
1252
|
+
each, because a single letter matches half the treedb and the graph's
|
|
1253
|
+
per-topic route (`.../graph/devices`) is a focus on `devices` that lands on
|
|
1254
|
+
every load: revealing a whole topic there opened 563 groups of a 6400-record
|
|
1255
|
+
treedb before anybody had touched anything. The count reported is of all the
|
|
1256
|
+
matches.
|
|
1257
|
+
- **Edition and the saved geometry are untouched by folding.** Only the cards
|
|
1258
|
+
on screen are read when the graph is saved; a folded card keeps the entry it
|
|
1259
|
+
had in `__graphs__`. A card on its default size grows by the pill row when it
|
|
1260
|
+
has pills and shrinks back when it has none; a saved size is the owner's and
|
|
1261
|
+
is left alone. The `+N` chips are not records: they are skipped by save,
|
|
1262
|
+
resize-all, select-all and the minimap's blocks.
|
|
1263
|
+
|
|
1264
|
+
One consumer key came with it: `show more`, the chip's tooltip.
|
|
1265
|
+
|
|
1211
1266
|
### C_YUI_TREEDB_SCHEMA — the treedb drawn the way its `.c` draws it
|
|
1212
1267
|
|
|
1213
1268
|
A landing view that draws a treedb the way its schema literal draws it in ASCII
|