vim-web 0.4.1-dev.2 → 0.4.1-dev.3
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
|
@@ -50290,7 +50290,7 @@ class CameraMovement {
|
|
|
50290
50290
|
* Resets the camera to its last saved position and orientation.
|
|
50291
50291
|
*/
|
|
50292
50292
|
reset() {
|
|
50293
|
-
this.set(this.
|
|
50293
|
+
this.set(this._savedState.position, this._savedState.target);
|
|
50294
50294
|
}
|
|
50295
50295
|
/**
|
|
50296
50296
|
* Sets the camera's orientation and position to focus on the specified target.
|
|
@@ -75774,6 +75774,7 @@ function useSectionBox(adapter) {
|
|
|
75774
75774
|
const topOffset = useStateRef(1);
|
|
75775
75775
|
const sideOffset = useStateRef(1);
|
|
75776
75776
|
const bottomOffset = useStateRef(1);
|
|
75777
|
+
const requestId = useRef(0);
|
|
75777
75778
|
const boxRef = useRef(adapter.getBox());
|
|
75778
75779
|
const getSelectionBox = useAsyncFuncRef(adapter.getSelectionBox);
|
|
75779
75780
|
const getSceneBox = useAsyncFuncRef(adapter.getSceneBox);
|
|
@@ -75803,22 +75804,23 @@ function useSectionBox(adapter) {
|
|
|
75803
75804
|
if (v) sectionSelection2.call();
|
|
75804
75805
|
});
|
|
75805
75806
|
visible2.useOnChange((v) => adapter.setVisible(v));
|
|
75806
|
-
const sectionBox2 = useArgActionRef((
|
|
75807
|
-
if (
|
|
75808
|
-
|
|
75809
|
-
|
|
75807
|
+
const sectionBox2 = useArgActionRef((box) => {
|
|
75808
|
+
if (box === void 0) return;
|
|
75809
|
+
requestId.current++;
|
|
75810
|
+
boxRef.current = box;
|
|
75811
|
+
const newBox = addBox(box, offsetsToBox3_(topOffset.get(), sideOffset.get(), bottomOffset.get()));
|
|
75810
75812
|
adapter.setBox(newBox);
|
|
75811
75813
|
});
|
|
75812
75814
|
const sectionSelection2 = useFuncRef(async () => {
|
|
75813
|
-
const
|
|
75815
|
+
const id2 = requestId.current;
|
|
75814
75816
|
const box = await getSelectionBox.call() ?? await getSceneBox.call();
|
|
75815
|
-
if (
|
|
75817
|
+
if (requestId.current !== id2) return;
|
|
75816
75818
|
sectionBox2.call(box);
|
|
75817
75819
|
});
|
|
75818
75820
|
const sectionScene = useFuncRef(async () => {
|
|
75819
|
-
const
|
|
75821
|
+
const id2 = requestId.current;
|
|
75820
75822
|
const box = await getSceneBox.call();
|
|
75821
|
-
if (
|
|
75823
|
+
if (requestId.current !== id2) return;
|
|
75822
75824
|
sectionBox2.call(box);
|
|
75823
75825
|
});
|
|
75824
75826
|
return {
|