@yuneta/gobj-ui 7.23.5 → 7.23.6

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
@@ -459,6 +459,11 @@ written in every editor that offers it and never drawn. Fold is the chevron
459
459
  pair, from the lazy tree viewer's own toolbar. The readout hangs off G6's
460
460
  `aftertransform`, the one hook that also covers the wheel.
461
461
 
462
+ Both graph toolbars are arranged the same way (`7.23.6`): camera and refresh in
463
+ the centre, layout picker and the fold pair on the right. The middle is the
464
+ camera — a fold changes the DOCUMENT, not the view of it, and among the camera
465
+ buttons it read as two more of them.
466
+
462
467
  The graph carries **its own** toolbar, a **layout picker**
463
468
  (`EV_CHANGE_LAYOUT {layout}`: `vertical tree`, `dagre top-down`,
464
469
  `dagre left-right` — the layout and the edge type move together), and since
@@ -12609,7 +12609,7 @@ function make_toolbar$1(gobj) {
12609
12609
  let left_items = [];
12610
12610
  let center_items = [];
12611
12611
  let right_items = [];
12612
- center_items = yui_graph_camera_items(gobj, priv.graph, toolbar_wide).concat(yui_graph_fold_items(gobj, toolbar_wide));
12612
+ center_items = yui_graph_camera_items(gobj, priv.graph, toolbar_wide);
12613
12613
  center_items.push(yui_graph_refresh_item(gobj, toolbar_wide));
12614
12614
  let options = [];
12615
12615
  for (let key of Object.keys(LAYOUTS)) {
@@ -12639,6 +12639,7 @@ function make_toolbar$1(gobj) {
12639
12639
  ]);
12640
12640
  priv.$layout_select = $select;
12641
12641
  right_items.push($select);
12642
+ right_items.push(...yui_graph_fold_items(gobj, toolbar_wide));
12642
12643
  const $toolbar = yui_toolbar({}, [
12643
12644
  [
12644
12645
  "div",
@@ -12604,7 +12604,7 @@ function make_toolbar$1(gobj) {
12604
12604
  let left_items = [];
12605
12605
  let center_items = [];
12606
12606
  let right_items = [];
12607
- center_items = yui_graph_camera_items(gobj, priv.graph, toolbar_wide).concat(yui_graph_fold_items(gobj, toolbar_wide));
12607
+ center_items = yui_graph_camera_items(gobj, priv.graph, toolbar_wide);
12608
12608
  center_items.push(yui_graph_refresh_item(gobj, toolbar_wide));
12609
12609
  let options = [];
12610
12610
  for (let key of Object.keys(LAYOUTS)) {
@@ -12634,6 +12634,7 @@ function make_toolbar$1(gobj) {
12634
12634
  ]);
12635
12635
  priv.$layout_select = $select;
12636
12636
  right_items.push($select);
12637
+ right_items.push(...yui_graph_fold_items(gobj, toolbar_wide));
12637
12638
  const $toolbar = yui_toolbar({}, [
12638
12639
  [
12639
12640
  "div",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuneta/gobj-ui",
3
- "version": "7.23.5",
3
+ "version": "7.23.6",
4
4
  "type": "module",
5
5
  "main": "dist/gobj-ui.cjs.js",
6
6
  "module": "dist/gobj-ui.es.js",
@@ -550,8 +550,7 @@ function make_toolbar(gobj)
550
550
  * console shows this graph and the JSON one side by side, so the
551
551
  * drawings have to be the same drawings.
552
552
  */
553
- center_items = yui_graph_camera_items(gobj, priv.graph, toolbar_wide)
554
- .concat(yui_graph_fold_items(gobj, toolbar_wide));
553
+ center_items = yui_graph_camera_items(gobj, priv.graph, toolbar_wide);
555
554
  center_items.push(yui_graph_refresh_item(gobj, toolbar_wide));
556
555
 
557
556
  /*
@@ -584,6 +583,12 @@ function make_toolbar(gobj)
584
583
  priv.$layout_select = $select;
585
584
  right_items.push($select);
586
585
 
586
+ /* Fold on the RIGHT, past the layout picker — where the JSON graph
587
+ * already put it. The camera is what the middle is for: the fold
588
+ * pair changes the DOCUMENT, not the view of it, and sitting in the
589
+ * middle it read as two more camera buttons. */
590
+ right_items.push(...yui_graph_fold_items(gobj, toolbar_wide));
591
+
587
592
  const $toolbar = yui_toolbar({}, [
588
593
  ['div', {class: 'yui-horizontal-toolbar-section left'}, left_items],
589
594
  ['div', {class: 'yui-horizontal-toolbar-section center'}, center_items],