@yuneta/gobj-ui 7.23.105 → 7.23.106

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.
@@ -63919,6 +63919,7 @@ function ac_layout_autoset(gobj, event, kw, src) {
63919
63919
  function ac_camera_changed(gobj, event, kw, src) {
63920
63920
  (0, _yuneta_gobj_js.gobj_write_attr)(gobj, "camera", {
63921
63921
  zoom: kw.zoom,
63922
+ node: kw.node,
63922
63923
  x: kw.x,
63923
63924
  y: kw.y
63924
63925
  });
@@ -63914,6 +63914,7 @@ function ac_layout_autoset(gobj, event, kw, src) {
63914
63914
  function ac_camera_changed(gobj, event, kw, src) {
63915
63915
  gobj_write_attr(gobj, "camera", {
63916
63916
  zoom: kw.zoom,
63917
+ node: kw.node,
63917
63918
  x: kw.x,
63918
63919
  y: kw.y
63919
63920
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuneta/gobj-ui",
3
- "version": "7.23.105",
3
+ "version": "7.23.106",
4
4
  "type": "module",
5
5
  "main": "dist/gobj-ui.cjs.js",
6
6
  "module": "dist/gobj-ui.es.js",
@@ -2900,8 +2900,13 @@ function ac_layout_autoset(gobj, event, kw, src)
2900
2900
  ************************************************************/
2901
2901
  function ac_camera_changed(gobj, event, kw, src)
2902
2902
  {
2903
+ /* `node` travels with the rest and is not optional: a camera is a
2904
+ * NODE at a viewport pixel, and one rebuilt here as `{zoom, x, y}`
2905
+ * -- which is what this did -- is a camera the engine refuses to
2906
+ * restore, so the graph came back at the right zoom in the wrong
2907
+ * place. Copy the fields the contract names, all of them. */
2903
2908
  gobj_write_attr(gobj, "camera", {
2904
- zoom: kw.zoom, x: kw.x, y: kw.y
2909
+ zoom: kw.zoom, node: kw.node, x: kw.x, y: kw.y
2905
2910
  });
2906
2911
  gobj_save_persistent_attrs(gobj, "camera");
2907
2912
  return 0;