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.
package/dist/vim-web.js
CHANGED
|
@@ -61338,6 +61338,9 @@ class ViewerSelection {
|
|
|
61338
61338
|
get onValueChanged() {
|
|
61339
61339
|
return this._onValueChanged.asEvent();
|
|
61340
61340
|
}
|
|
61341
|
+
get() {
|
|
61342
|
+
return this._selectedNodes;
|
|
61343
|
+
}
|
|
61341
61344
|
/**
|
|
61342
61345
|
* Gets the total number of selected nodes across all VIMs.
|
|
61343
61346
|
* @returns The total count of selected nodes.
|
|
@@ -72102,31 +72105,10 @@ function VimContextMenu(props) {
|
|
|
72102
72105
|
};
|
|
72103
72106
|
const viewer = props.viewer;
|
|
72104
72107
|
const camera2 = props.camera;
|
|
72105
|
-
const [section, setSection] = useState({
|
|
72106
|
-
visible: viewer.gizmos.sectionBox.visible,
|
|
72107
|
-
clip: viewer.gizmos.sectionBox.clip
|
|
72108
|
-
});
|
|
72109
|
-
const isClipping = () => {
|
|
72110
|
-
return !viewer.gizmos.sectionBox.box.containsBox(viewer.renderer.getBoundingBox());
|
|
72111
|
-
};
|
|
72112
|
-
const [clipping, setClipping] = useState(isClipping());
|
|
72113
72108
|
const [, setVersion] = useState(0);
|
|
72114
72109
|
const hidden2 = props.isolation.isActive();
|
|
72115
72110
|
useEffect(() => {
|
|
72116
|
-
const subState = viewer.gizmos.sectionBox.onStateChanged.subscribe(() => {
|
|
72117
|
-
setSection({
|
|
72118
|
-
visible: viewer.gizmos.sectionBox.visible,
|
|
72119
|
-
clip: viewer.gizmos.sectionBox.clip
|
|
72120
|
-
});
|
|
72121
|
-
});
|
|
72122
|
-
const subConfirm = viewer.gizmos.sectionBox.onBoxConfirm.subscribe(
|
|
72123
|
-
() => setClipping(isClipping())
|
|
72124
|
-
);
|
|
72125
72111
|
props.isolation.onChanged.subscribe(() => setVersion((v) => v + 1));
|
|
72126
|
-
return () => {
|
|
72127
|
-
subState();
|
|
72128
|
-
subConfirm();
|
|
72129
|
-
};
|
|
72130
72112
|
}, []);
|
|
72131
72113
|
const onShowControlsBtn = (e) => {
|
|
72132
72114
|
props.modal.help(true);
|
|
@@ -72162,30 +72144,13 @@ function VimContextMenu(props) {
|
|
|
72162
72144
|
props.isolation.show(getSelection(), "contextMenu");
|
|
72163
72145
|
e.stopPropagation();
|
|
72164
72146
|
};
|
|
72165
|
-
const onSelectionClearBtn = (e) => {
|
|
72166
|
-
viewer.selection.clear();
|
|
72167
|
-
e.stopPropagation();
|
|
72168
|
-
};
|
|
72169
72147
|
const onShowAllBtn = (e) => {
|
|
72170
72148
|
props.isolation.clear("contextMenu");
|
|
72171
72149
|
e.stopPropagation();
|
|
72172
72150
|
};
|
|
72173
|
-
const onSectionToggleBtn = (e) => {
|
|
72174
|
-
viewer.gizmos.sectionBox.clip = !viewer.gizmos.sectionBox.clip;
|
|
72175
|
-
};
|
|
72176
|
-
const onSectionResetBtn = (e) => {
|
|
72177
|
-
viewer.gizmos.sectionBox.fitBox(viewer.renderer.getBoundingBox());
|
|
72178
|
-
e.stopPropagation();
|
|
72179
|
-
};
|
|
72180
72151
|
const onMeasureDeleteBtn = (e) => {
|
|
72181
72152
|
viewer.gizmos.measure.abort();
|
|
72182
72153
|
};
|
|
72183
|
-
const onFitSectionToSelectionBtn = (e) => {
|
|
72184
|
-
const box = viewer.selection.getBoundingBox();
|
|
72185
|
-
if (box) {
|
|
72186
|
-
viewer.gizmos.sectionBox.fitBox(box);
|
|
72187
|
-
}
|
|
72188
|
-
};
|
|
72189
72154
|
const createButton2 = (button) => {
|
|
72190
72155
|
if (!button.enabled) return null;
|
|
72191
72156
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -72232,10 +72197,10 @@ function VimContextMenu(props) {
|
|
|
72232
72197
|
},
|
|
72233
72198
|
{
|
|
72234
72199
|
id: contextMenuElementIds.zoomToFit,
|
|
72235
|
-
label: "
|
|
72200
|
+
label: "Focus Camera",
|
|
72236
72201
|
keyboard: "F",
|
|
72237
72202
|
action: onCameraFrameBtn,
|
|
72238
|
-
enabled:
|
|
72203
|
+
enabled: hasSelection
|
|
72239
72204
|
},
|
|
72240
72205
|
{
|
|
72241
72206
|
id: contextMenuElementIds.dividerSelection,
|
|
@@ -72269,13 +72234,6 @@ function VimContextMenu(props) {
|
|
|
72269
72234
|
action: onSelectionShowBtn,
|
|
72270
72235
|
enabled: hasSelection && !hasVisibleSelection
|
|
72271
72236
|
},
|
|
72272
|
-
{
|
|
72273
|
-
id: contextMenuElementIds.clearSelection,
|
|
72274
|
-
label: "Clear Selection",
|
|
72275
|
-
keyboard: "Esc",
|
|
72276
|
-
action: onSelectionClearBtn,
|
|
72277
|
-
enabled: hasSelection
|
|
72278
|
-
},
|
|
72279
72237
|
{
|
|
72280
72238
|
id: contextMenuElementIds.showAll,
|
|
72281
72239
|
label: "Show All",
|
|
@@ -72290,31 +72248,6 @@ function VimContextMenu(props) {
|
|
|
72290
72248
|
keyboard: "",
|
|
72291
72249
|
action: onMeasureDeleteBtn,
|
|
72292
72250
|
enabled: measuring
|
|
72293
|
-
},
|
|
72294
|
-
{
|
|
72295
|
-
id: contextMenuElementIds.dividerSection,
|
|
72296
|
-
enabled: clipping || section.visible
|
|
72297
|
-
},
|
|
72298
|
-
{
|
|
72299
|
-
id: contextMenuElementIds.ignoreSection,
|
|
72300
|
-
label: section.clip ? "Ignore Section Box" : "Apply Section Box",
|
|
72301
|
-
keyboard: "",
|
|
72302
|
-
action: onSectionToggleBtn,
|
|
72303
|
-
enabled: clipping
|
|
72304
|
-
},
|
|
72305
|
-
{
|
|
72306
|
-
id: contextMenuElementIds.resetSection,
|
|
72307
|
-
label: "Reset Section Box",
|
|
72308
|
-
keyboard: "",
|
|
72309
|
-
action: onSectionResetBtn,
|
|
72310
|
-
enabled: clipping
|
|
72311
|
-
},
|
|
72312
|
-
{
|
|
72313
|
-
id: contextMenuElementIds.fitSectionToSelection,
|
|
72314
|
-
label: "Fit Section Box to Selection",
|
|
72315
|
-
keyboard: "",
|
|
72316
|
-
action: onFitSectionToSelectionBtn,
|
|
72317
|
-
enabled: section.visible && hasSelection
|
|
72318
72251
|
}
|
|
72319
72252
|
];
|
|
72320
72253
|
elements = ((_c = props.customization) == null ? void 0 : _c.call(props, elements)) ?? elements;
|