vim-web 0.3.44-dev.24 → 0.3.44-dev.26
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
|
@@ -60766,11 +60766,20 @@ class Vim2 {
|
|
|
60766
60766
|
*/
|
|
60767
60767
|
removeHighlight(nodes, fallback) {
|
|
60768
60768
|
const toUpdate = [];
|
|
60769
|
-
|
|
60770
|
-
const state
|
|
60771
|
-
|
|
60772
|
-
|
|
60773
|
-
|
|
60769
|
+
if (nodes === "all") {
|
|
60770
|
+
for (const [node, state] of this._nodeStates.entries()) {
|
|
60771
|
+
if (state === "highlighted") {
|
|
60772
|
+
this._nodeStates.set(node, fallback);
|
|
60773
|
+
toUpdate.push(node);
|
|
60774
|
+
}
|
|
60775
|
+
}
|
|
60776
|
+
} else {
|
|
60777
|
+
for (const node of nodes) {
|
|
60778
|
+
const state = this._nodeStates.get(node);
|
|
60779
|
+
if (state === "highlighted") {
|
|
60780
|
+
this._nodeStates.set(node, fallback);
|
|
60781
|
+
toUpdate.push(node);
|
|
60782
|
+
}
|
|
60774
60783
|
}
|
|
60775
60784
|
}
|
|
60776
60785
|
if (toUpdate.length > 0) {
|
|
@@ -75851,6 +75860,13 @@ function useSectionBox(adapter) {
|
|
|
75851
75860
|
const sideOffset = useStateRef("1");
|
|
75852
75861
|
const bottomOffset = useStateRef("1");
|
|
75853
75862
|
const boxRef = useRef(adapter.getBox());
|
|
75863
|
+
useEffect(() => {
|
|
75864
|
+
adapter.setClip(true);
|
|
75865
|
+
adapter.setVisible(false);
|
|
75866
|
+
return adapter.onSelectionChanged.sub(() => {
|
|
75867
|
+
if (auto.get() && enable.get()) sectionSelection.call();
|
|
75868
|
+
});
|
|
75869
|
+
}, []);
|
|
75854
75870
|
enable.useOnChange((v) => {
|
|
75855
75871
|
visible2.set(v);
|
|
75856
75872
|
showOffsetPanel.set(false);
|
|
@@ -75872,12 +75888,6 @@ function useSectionBox(adapter) {
|
|
|
75872
75888
|
if (v) sectionSelection.call();
|
|
75873
75889
|
});
|
|
75874
75890
|
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
75891
|
const section = useArgActionRef((baseBox) => {
|
|
75882
75892
|
boxRef.current = baseBox;
|
|
75883
75893
|
const newBox = addBox(baseBox, offsetsToBox3(topOffset.get(), sideOffset.get(), bottomOffset.get()));
|
|
@@ -75930,10 +75940,12 @@ function offsetsToBox3(top, side, bottom) {
|
|
|
75930
75940
|
}
|
|
75931
75941
|
function useWebglSectionBox(viewer) {
|
|
75932
75942
|
const vimAdapter = {
|
|
75943
|
+
setClip: (b) => {
|
|
75944
|
+
viewer.gizmos.sectionBox.clip = b;
|
|
75945
|
+
},
|
|
75933
75946
|
setVisible: (b) => {
|
|
75934
75947
|
viewer.gizmos.sectionBox.visible = b;
|
|
75935
75948
|
viewer.gizmos.sectionBox.interactive = b;
|
|
75936
|
-
viewer.gizmos.sectionBox.clip = b;
|
|
75937
75949
|
},
|
|
75938
75950
|
getBox: () => viewer.gizmos.sectionBox.box.clone(),
|
|
75939
75951
|
fitBox: (box) => viewer.gizmos.sectionBox.fitBox(box),
|
|
@@ -76479,11 +76491,12 @@ async function updateProgress(request2, modal) {
|
|
|
76479
76491
|
}
|
|
76480
76492
|
function useUltraSectionBox(viewer) {
|
|
76481
76493
|
const ultraAdapter = {
|
|
76494
|
+
setClip: (b) => {
|
|
76495
|
+
viewer.sectionBox.clip = b;
|
|
76496
|
+
},
|
|
76482
76497
|
setVisible: (b) => {
|
|
76483
|
-
console.log("SetVisible!", b);
|
|
76484
76498
|
viewer.sectionBox.visible = b;
|
|
76485
76499
|
viewer.sectionBox.interactive = b;
|
|
76486
|
-
viewer.sectionBox.clip = b;
|
|
76487
76500
|
},
|
|
76488
76501
|
getBox: () => viewer.sectionBox.getBox().clone(),
|
|
76489
76502
|
fitBox: (box) => viewer.sectionBox.fitBox(box),
|