vim-web 0.3.44-dev.23 → 0.3.44-dev.25

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
@@ -61338,6 +61338,9 @@ class ViewerSelection {
61338
61338
  get onValueChanged() {
61339
61339
  return this._onValueChanged.asEvent();
61340
61340
  }
61341
+ get() {
61342
+ return this._selectedNodes;
61343
+ }
61341
61344
  /**
61342
61345
  * Gets the total number of selected nodes across all VIMs.
61343
61346
  * @returns The total count of selected nodes.
@@ -75848,6 +75851,13 @@ function useSectionBox(adapter) {
75848
75851
  const sideOffset = useStateRef("1");
75849
75852
  const bottomOffset = useStateRef("1");
75850
75853
  const boxRef = useRef(adapter.getBox());
75854
+ useEffect(() => {
75855
+ adapter.setClip(true);
75856
+ adapter.setVisible(false);
75857
+ return adapter.onSelectionChanged.sub(() => {
75858
+ if (auto.get() && enable.get()) sectionSelection.call();
75859
+ });
75860
+ }, []);
75851
75861
  enable.useOnChange((v) => {
75852
75862
  visible2.set(v);
75853
75863
  showOffsetPanel.set(false);
@@ -75869,12 +75879,6 @@ function useSectionBox(adapter) {
75869
75879
  if (v) sectionSelection.call();
75870
75880
  });
75871
75881
  visible2.useOnChange((v) => adapter.setVisible(v));
75872
- useEffect(() => {
75873
- adapter.setVisible(false);
75874
- return adapter.onSelectionChanged.sub(() => {
75875
- if (auto.get() && enable.get()) sectionSelection.call();
75876
- });
75877
- }, []);
75878
75882
  const section = useArgActionRef((baseBox) => {
75879
75883
  boxRef.current = baseBox;
75880
75884
  const newBox = addBox(baseBox, offsetsToBox3(topOffset.get(), sideOffset.get(), bottomOffset.get()));
@@ -75927,10 +75931,12 @@ function offsetsToBox3(top, side, bottom) {
75927
75931
  }
75928
75932
  function useWebglSectionBox(viewer) {
75929
75933
  const vimAdapter = {
75934
+ setClip: (b) => {
75935
+ viewer.gizmos.sectionBox.clip = b;
75936
+ },
75930
75937
  setVisible: (b) => {
75931
75938
  viewer.gizmos.sectionBox.visible = b;
75932
75939
  viewer.gizmos.sectionBox.interactive = b;
75933
- viewer.gizmos.sectionBox.clip = b;
75934
75940
  },
75935
75941
  getBox: () => viewer.gizmos.sectionBox.box.clone(),
75936
75942
  fitBox: (box) => viewer.gizmos.sectionBox.fitBox(box),
@@ -76476,11 +76482,12 @@ async function updateProgress(request2, modal) {
76476
76482
  }
76477
76483
  function useUltraSectionBox(viewer) {
76478
76484
  const ultraAdapter = {
76485
+ setClip: (b) => {
76486
+ viewer.sectionBox.clip = b;
76487
+ },
76479
76488
  setVisible: (b) => {
76480
- console.log("SetVisible!", b);
76481
76489
  viewer.sectionBox.visible = b;
76482
76490
  viewer.sectionBox.interactive = b;
76483
- viewer.sectionBox.clip = b;
76484
76491
  },
76485
76492
  getBox: () => viewer.sectionBox.getBox().clone(),
76486
76493
  fitBox: (box) => viewer.sectionBox.fitBox(box),