vim-web 0.3.44-dev.21 → 0.3.44-dev.22

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/dist/vim-web.js CHANGED
@@ -61373,7 +61373,7 @@ class ViewerSelection {
61373
61373
  * @param node - A single node index or array of node indices to select.
61374
61374
  */
61375
61375
  select(vim, node) {
61376
- this.clear();
61376
+ this._clear();
61377
61377
  this.add(vim, node);
61378
61378
  }
61379
61379
  /**
@@ -61448,6 +61448,12 @@ class ViewerSelection {
61448
61448
  * @param vim - Optional. If provided, only clears selections for the specified VIM.
61449
61449
  */
61450
61450
  clear(vim) {
61451
+ const changed = this._clear(vim);
61452
+ if (changed) {
61453
+ this._onValueChanged.dispatch();
61454
+ }
61455
+ }
61456
+ _clear(vim) {
61451
61457
  let changed = false;
61452
61458
  this._selectedNodes.forEach((nodes, v) => {
61453
61459
  if (vim === void 0 || v === vim) {
@@ -61456,9 +61462,7 @@ class ViewerSelection {
61456
61462
  }
61457
61463
  });
61458
61464
  this._selectedNodes.clear();
61459
- if (changed) {
61460
- this._onValueChanged.dispatch();
61461
- }
61465
+ return changed;
61462
61466
  }
61463
61467
  /**
61464
61468
  * Calculates the bounding box encompassing all selected nodes.
@@ -61480,8 +61484,7 @@ class ViewerSelection {
61480
61484
  * Should be called when the selection manager is no longer needed.
61481
61485
  */
61482
61486
  dispose() {
61483
- this.clear();
61484
- this._selectedNodes = /* @__PURE__ */ new Map();
61487
+ this._clear();
61485
61488
  }
61486
61489
  }
61487
61490
  class VimCollection {
@@ -75997,6 +76000,7 @@ function useWebglSectionBox(viewer) {
75997
76000
  setVisible: (b) => {
75998
76001
  viewer.gizmos.sectionBox.visible = b;
75999
76002
  viewer.gizmos.sectionBox.interactive = b;
76003
+ viewer.gizmos.sectionBox.clip = b;
76000
76004
  },
76001
76005
  getBox: () => viewer.gizmos.sectionBox.box.clone(),
76002
76006
  fitBox: (box) => viewer.gizmos.sectionBox.fitBox(box),
@@ -76004,7 +76008,6 @@ function useWebglSectionBox(viewer) {
76004
76008
  getRendererBox: () => Promise.resolve(viewer.renderer.getBoundingBox()),
76005
76009
  onSelectionChanged: viewer.selection.onValueChanged
76006
76010
  };
76007
- viewer.gizmos.sectionBox.clip = true;
76008
76011
  return useSectionBox(vimAdapter);
76009
76012
  }
76010
76013
  function useCamera(adapter) {
@@ -76547,6 +76550,7 @@ function useUltraSectionBox(viewer) {
76547
76550
  console.log("SetVisible!", b);
76548
76551
  viewer.sectionBox.visible = b;
76549
76552
  viewer.sectionBox.interactive = b;
76553
+ viewer.sectionBox.clip = b;
76550
76554
  },
76551
76555
  getBox: () => viewer.sectionBox.getBox().clone(),
76552
76556
  fitBox: (box) => viewer.sectionBox.fitBox(box),