vim-web 0.3.44-dev.60 → 0.3.44-dev.61
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/types/react-viewers/panels/messageBox.d.ts +1 -1
- package/dist/types/react-viewers/panels/modal.d.ts +1 -1
- package/dist/types/react-viewers/state/sharedIsolation.d.ts +3 -1
- package/dist/vim-web.iife.js +18 -11
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +18 -11
- package/dist/vim-web.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { LoadingBoxProps, LoadingBoxPropsTyped } from './loadingBox';
|
|
|
4
4
|
import { HelpProps, HelpPropsTyped } from './help';
|
|
5
5
|
export type ModalProps = MessageBoxProps | LoadingBoxProps | HelpProps;
|
|
6
6
|
export type ModalPropsTyped = (MessageBoxPropsTyped | LoadingBoxPropsTyped | HelpPropsTyped) & {
|
|
7
|
-
canClose
|
|
7
|
+
canClose?: boolean;
|
|
8
8
|
onClose?: () => void;
|
|
9
9
|
};
|
|
10
10
|
export type ModalRef = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RefObject } from "react";
|
|
2
|
-
import { StateRef } from "../helpers/reactUtils";
|
|
2
|
+
import { FuncRef, StateRef } from "../helpers/reactUtils";
|
|
3
3
|
import { ISignal } from "ste-signals";
|
|
4
4
|
export type VisibilityStatus = 'all' | 'allButSelection' | 'onlySelection' | 'some' | 'none';
|
|
5
5
|
export interface IsolationRef {
|
|
@@ -10,6 +10,8 @@ export interface IsolationRef {
|
|
|
10
10
|
showGhost: StateRef<boolean>;
|
|
11
11
|
ghostOpacity: StateRef<string>;
|
|
12
12
|
showRooms: StateRef<boolean>;
|
|
13
|
+
onAutoIsolate: FuncRef<void>;
|
|
14
|
+
onVisibilityChange: FuncRef<void>;
|
|
13
15
|
}
|
|
14
16
|
export interface IsolationAdapter {
|
|
15
17
|
onSelectionChanged: ISignal;
|
package/dist/vim-web.iife.js
CHANGED
|
@@ -75378,6 +75378,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75378
75378
|
const getActiveState = () => {
|
|
75379
75379
|
return (state == null ? void 0 : state[0]) ?? (state == null ? void 0 : state[1]) ?? (state == null ? void 0 : state[2]);
|
|
75380
75380
|
};
|
|
75381
|
+
console.log("REnder Modal and setup Imperative handle");
|
|
75381
75382
|
React2.useImperativeHandle(ref, () => ({
|
|
75382
75383
|
getActiveState,
|
|
75383
75384
|
loading(content2) {
|
|
@@ -75756,18 +75757,28 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75756
75757
|
const showRooms = useStateRef(false);
|
|
75757
75758
|
const showGhost = useStateRef(false);
|
|
75758
75759
|
const ghostOpacity = useStateRef(() => adapter.getGhostOpacity().toFixed(4));
|
|
75760
|
+
const onAutoIsolate = useFuncRef(() => {
|
|
75761
|
+
if (adapter.hasSelection()) {
|
|
75762
|
+
adapter.isolateSelection();
|
|
75763
|
+
} else {
|
|
75764
|
+
adapter.showAll();
|
|
75765
|
+
}
|
|
75766
|
+
});
|
|
75767
|
+
const onVisibilityChange = useFuncRef(() => {
|
|
75768
|
+
visibility.set(adapter.computeVisibility());
|
|
75769
|
+
});
|
|
75759
75770
|
React2.useEffect(() => {
|
|
75760
75771
|
adapter.showGhost(showGhost.get());
|
|
75761
75772
|
adapter.onVisibilityChange.sub(() => {
|
|
75762
|
-
|
|
75773
|
+
onVisibilityChange.call();
|
|
75763
75774
|
});
|
|
75764
75775
|
adapter.onSelectionChanged.sub(() => {
|
|
75765
|
-
if (autoIsolate2.get()) onAutoIsolate(
|
|
75776
|
+
if (autoIsolate2.get()) onAutoIsolate.call();
|
|
75766
75777
|
});
|
|
75767
75778
|
}, []);
|
|
75768
75779
|
ghostOpacity.useConfirm((v) => sanitize(v, true, 0.04));
|
|
75769
75780
|
autoIsolate2.useOnChange((v) => {
|
|
75770
|
-
if (v) onAutoIsolate(
|
|
75781
|
+
if (v) onAutoIsolate.call();
|
|
75771
75782
|
});
|
|
75772
75783
|
showGhost.useOnChange((v) => adapter.showGhost(v));
|
|
75773
75784
|
showRooms.useOnChange((v) => adapter.setShowRooms(v));
|
|
@@ -75779,16 +75790,11 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75779
75790
|
showPanel,
|
|
75780
75791
|
showGhost,
|
|
75781
75792
|
showRooms,
|
|
75782
|
-
ghostOpacity
|
|
75793
|
+
ghostOpacity,
|
|
75794
|
+
onAutoIsolate,
|
|
75795
|
+
onVisibilityChange
|
|
75783
75796
|
};
|
|
75784
75797
|
}
|
|
75785
|
-
function onAutoIsolate(adapter) {
|
|
75786
|
-
if (adapter.hasSelection()) {
|
|
75787
|
-
adapter.isolateSelection();
|
|
75788
|
-
} else {
|
|
75789
|
-
adapter.showAll();
|
|
75790
|
-
}
|
|
75791
|
-
}
|
|
75792
75798
|
function useWebglIsolation(viewer) {
|
|
75793
75799
|
const adapter = createWebglIsolationAdapter(viewer);
|
|
75794
75800
|
return useSharedIsolation(adapter);
|
|
@@ -75938,6 +75944,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75938
75944
|
props.viewer.viewport.canvas.tabIndex = 0;
|
|
75939
75945
|
applyWebglBindings(props.viewer, camera2, isolationRef, side);
|
|
75940
75946
|
const subContext = props.viewer.inputs.onContextMenu.subscribe(showContextMenu);
|
|
75947
|
+
console.log("ON MOUNT");
|
|
75941
75948
|
props.onMount({
|
|
75942
75949
|
container: props.container,
|
|
75943
75950
|
core: props.viewer,
|