vim-web 0.3.44-dev.24 → 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
@@ -75851,6 +75851,13 @@ function useSectionBox(adapter) {
75851
75851
  const sideOffset = useStateRef("1");
75852
75852
  const bottomOffset = useStateRef("1");
75853
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
+ }, []);
75854
75861
  enable.useOnChange((v) => {
75855
75862
  visible2.set(v);
75856
75863
  showOffsetPanel.set(false);
@@ -75872,12 +75879,6 @@ function useSectionBox(adapter) {
75872
75879
  if (v) sectionSelection.call();
75873
75880
  });
75874
75881
  visible2.useOnChange((v) => adapter.setVisible(v));
75875
- useEffect(() => {
75876
- adapter.setVisible(false);
75877
- return adapter.onSelectionChanged.sub(() => {
75878
- if (auto.get() && enable.get()) sectionSelection.call();
75879
- });
75880
- }, []);
75881
75882
  const section = useArgActionRef((baseBox) => {
75882
75883
  boxRef.current = baseBox;
75883
75884
  const newBox = addBox(baseBox, offsetsToBox3(topOffset.get(), sideOffset.get(), bottomOffset.get()));
@@ -75930,10 +75931,12 @@ function offsetsToBox3(top, side, bottom) {
75930
75931
  }
75931
75932
  function useWebglSectionBox(viewer) {
75932
75933
  const vimAdapter = {
75934
+ setClip: (b) => {
75935
+ viewer.gizmos.sectionBox.clip = b;
75936
+ },
75933
75937
  setVisible: (b) => {
75934
75938
  viewer.gizmos.sectionBox.visible = b;
75935
75939
  viewer.gizmos.sectionBox.interactive = b;
75936
- viewer.gizmos.sectionBox.clip = b;
75937
75940
  },
75938
75941
  getBox: () => viewer.gizmos.sectionBox.box.clone(),
75939
75942
  fitBox: (box) => viewer.gizmos.sectionBox.fitBox(box),
@@ -76479,11 +76482,12 @@ async function updateProgress(request2, modal) {
76479
76482
  }
76480
76483
  function useUltraSectionBox(viewer) {
76481
76484
  const ultraAdapter = {
76485
+ setClip: (b) => {
76486
+ viewer.sectionBox.clip = b;
76487
+ },
76482
76488
  setVisible: (b) => {
76483
- console.log("SetVisible!", b);
76484
76489
  viewer.sectionBox.visible = b;
76485
76490
  viewer.sectionBox.interactive = b;
76486
- viewer.sectionBox.clip = b;
76487
76491
  },
76488
76492
  getBox: () => viewer.sectionBox.getBox().clone(),
76489
76493
  fitBox: (box) => viewer.sectionBox.fitBox(box),