vim-web 0.3.44-dev.22 → 0.3.44-dev.24
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.
|
@@ -9,6 +9,7 @@ export interface IViewerSelection {
|
|
|
9
9
|
add(vim: Vim, node: number | number[]): void;
|
|
10
10
|
remove(vim: Vim, node: number | number[]): void;
|
|
11
11
|
clear(vim?: Vim): void;
|
|
12
|
+
get(): ReadonlyMap<Vim, ReadonlySet<number>>;
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* Represents the result of a hit test operation.
|
|
@@ -32,6 +33,7 @@ export declare class ViewerSelection implements IViewerSelection {
|
|
|
32
33
|
private _selectedNodes;
|
|
33
34
|
private _onValueChanged;
|
|
34
35
|
get onValueChanged(): import("ste-signals").ISignal;
|
|
36
|
+
get(): ReadonlyMap<Vim, ReadonlySet<number>>;
|
|
35
37
|
/**
|
|
36
38
|
* Creates a new ViewerSelection instance.
|
|
37
39
|
* @param rpc - RPC client for communication with the viewer.
|
package/dist/vim-web.iife.js
CHANGED
|
@@ -61354,6 +61354,9 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
61354
61354
|
get onValueChanged() {
|
|
61355
61355
|
return this._onValueChanged.asEvent();
|
|
61356
61356
|
}
|
|
61357
|
+
get() {
|
|
61358
|
+
return this._selectedNodes;
|
|
61359
|
+
}
|
|
61357
61360
|
/**
|
|
61358
61361
|
* Gets the total number of selected nodes across all VIMs.
|
|
61359
61362
|
* @returns The total count of selected nodes.
|
|
@@ -72118,31 +72121,10 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72118
72121
|
};
|
|
72119
72122
|
const viewer = props.viewer;
|
|
72120
72123
|
const camera2 = props.camera;
|
|
72121
|
-
const [section, setSection] = React2.useState({
|
|
72122
|
-
visible: viewer.gizmos.sectionBox.visible,
|
|
72123
|
-
clip: viewer.gizmos.sectionBox.clip
|
|
72124
|
-
});
|
|
72125
|
-
const isClipping = () => {
|
|
72126
|
-
return !viewer.gizmos.sectionBox.box.containsBox(viewer.renderer.getBoundingBox());
|
|
72127
|
-
};
|
|
72128
|
-
const [clipping, setClipping] = React2.useState(isClipping());
|
|
72129
72124
|
const [, setVersion] = React2.useState(0);
|
|
72130
72125
|
const hidden2 = props.isolation.isActive();
|
|
72131
72126
|
React2.useEffect(() => {
|
|
72132
|
-
const subState = viewer.gizmos.sectionBox.onStateChanged.subscribe(() => {
|
|
72133
|
-
setSection({
|
|
72134
|
-
visible: viewer.gizmos.sectionBox.visible,
|
|
72135
|
-
clip: viewer.gizmos.sectionBox.clip
|
|
72136
|
-
});
|
|
72137
|
-
});
|
|
72138
|
-
const subConfirm = viewer.gizmos.sectionBox.onBoxConfirm.subscribe(
|
|
72139
|
-
() => setClipping(isClipping())
|
|
72140
|
-
);
|
|
72141
72127
|
props.isolation.onChanged.subscribe(() => setVersion((v) => v + 1));
|
|
72142
|
-
return () => {
|
|
72143
|
-
subState();
|
|
72144
|
-
subConfirm();
|
|
72145
|
-
};
|
|
72146
72128
|
}, []);
|
|
72147
72129
|
const onShowControlsBtn = (e) => {
|
|
72148
72130
|
props.modal.help(true);
|
|
@@ -72178,30 +72160,13 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72178
72160
|
props.isolation.show(getSelection(), "contextMenu");
|
|
72179
72161
|
e.stopPropagation();
|
|
72180
72162
|
};
|
|
72181
|
-
const onSelectionClearBtn = (e) => {
|
|
72182
|
-
viewer.selection.clear();
|
|
72183
|
-
e.stopPropagation();
|
|
72184
|
-
};
|
|
72185
72163
|
const onShowAllBtn = (e) => {
|
|
72186
72164
|
props.isolation.clear("contextMenu");
|
|
72187
72165
|
e.stopPropagation();
|
|
72188
72166
|
};
|
|
72189
|
-
const onSectionToggleBtn = (e) => {
|
|
72190
|
-
viewer.gizmos.sectionBox.clip = !viewer.gizmos.sectionBox.clip;
|
|
72191
|
-
};
|
|
72192
|
-
const onSectionResetBtn = (e) => {
|
|
72193
|
-
viewer.gizmos.sectionBox.fitBox(viewer.renderer.getBoundingBox());
|
|
72194
|
-
e.stopPropagation();
|
|
72195
|
-
};
|
|
72196
72167
|
const onMeasureDeleteBtn = (e) => {
|
|
72197
72168
|
viewer.gizmos.measure.abort();
|
|
72198
72169
|
};
|
|
72199
|
-
const onFitSectionToSelectionBtn = (e) => {
|
|
72200
|
-
const box = viewer.selection.getBoundingBox();
|
|
72201
|
-
if (box) {
|
|
72202
|
-
viewer.gizmos.sectionBox.fitBox(box);
|
|
72203
|
-
}
|
|
72204
|
-
};
|
|
72205
72170
|
const createButton2 = (button) => {
|
|
72206
72171
|
if (!button.enabled) return null;
|
|
72207
72172
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -72248,10 +72213,10 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72248
72213
|
},
|
|
72249
72214
|
{
|
|
72250
72215
|
id: contextMenuElementIds.zoomToFit,
|
|
72251
|
-
label: "
|
|
72216
|
+
label: "Focus Camera",
|
|
72252
72217
|
keyboard: "F",
|
|
72253
72218
|
action: onCameraFrameBtn,
|
|
72254
|
-
enabled:
|
|
72219
|
+
enabled: hasSelection
|
|
72255
72220
|
},
|
|
72256
72221
|
{
|
|
72257
72222
|
id: contextMenuElementIds.dividerSelection,
|
|
@@ -72285,13 +72250,6 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72285
72250
|
action: onSelectionShowBtn,
|
|
72286
72251
|
enabled: hasSelection && !hasVisibleSelection
|
|
72287
72252
|
},
|
|
72288
|
-
{
|
|
72289
|
-
id: contextMenuElementIds.clearSelection,
|
|
72290
|
-
label: "Clear Selection",
|
|
72291
|
-
keyboard: "Esc",
|
|
72292
|
-
action: onSelectionClearBtn,
|
|
72293
|
-
enabled: hasSelection
|
|
72294
|
-
},
|
|
72295
72253
|
{
|
|
72296
72254
|
id: contextMenuElementIds.showAll,
|
|
72297
72255
|
label: "Show All",
|
|
@@ -72306,31 +72264,6 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72306
72264
|
keyboard: "",
|
|
72307
72265
|
action: onMeasureDeleteBtn,
|
|
72308
72266
|
enabled: measuring
|
|
72309
|
-
},
|
|
72310
|
-
{
|
|
72311
|
-
id: contextMenuElementIds.dividerSection,
|
|
72312
|
-
enabled: clipping || section.visible
|
|
72313
|
-
},
|
|
72314
|
-
{
|
|
72315
|
-
id: contextMenuElementIds.ignoreSection,
|
|
72316
|
-
label: section.clip ? "Ignore Section Box" : "Apply Section Box",
|
|
72317
|
-
keyboard: "",
|
|
72318
|
-
action: onSectionToggleBtn,
|
|
72319
|
-
enabled: clipping
|
|
72320
|
-
},
|
|
72321
|
-
{
|
|
72322
|
-
id: contextMenuElementIds.resetSection,
|
|
72323
|
-
label: "Reset Section Box",
|
|
72324
|
-
keyboard: "",
|
|
72325
|
-
action: onSectionResetBtn,
|
|
72326
|
-
enabled: clipping
|
|
72327
|
-
},
|
|
72328
|
-
{
|
|
72329
|
-
id: contextMenuElementIds.fitSectionToSelection,
|
|
72330
|
-
label: "Fit Section Box to Selection",
|
|
72331
|
-
keyboard: "",
|
|
72332
|
-
action: onFitSectionToSelectionBtn,
|
|
72333
|
-
enabled: section.visible && hasSelection
|
|
72334
72267
|
}
|
|
72335
72268
|
];
|
|
72336
72269
|
elements = ((_c = props.customization) == null ? void 0 : _c.call(props, elements)) ?? elements;
|