vim-web 0.3.44-dev.22 → 0.3.44-dev.23
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.iife.js +2 -72
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +2 -72
- package/dist/vim-web.js.map +1 -1
- package/package.json +1 -1
package/dist/vim-web.iife.js
CHANGED
|
@@ -72118,31 +72118,10 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72118
72118
|
};
|
|
72119
72119
|
const viewer = props.viewer;
|
|
72120
72120
|
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
72121
|
const [, setVersion] = React2.useState(0);
|
|
72130
72122
|
const hidden2 = props.isolation.isActive();
|
|
72131
72123
|
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
72124
|
props.isolation.onChanged.subscribe(() => setVersion((v) => v + 1));
|
|
72142
|
-
return () => {
|
|
72143
|
-
subState();
|
|
72144
|
-
subConfirm();
|
|
72145
|
-
};
|
|
72146
72125
|
}, []);
|
|
72147
72126
|
const onShowControlsBtn = (e) => {
|
|
72148
72127
|
props.modal.help(true);
|
|
@@ -72178,30 +72157,13 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72178
72157
|
props.isolation.show(getSelection(), "contextMenu");
|
|
72179
72158
|
e.stopPropagation();
|
|
72180
72159
|
};
|
|
72181
|
-
const onSelectionClearBtn = (e) => {
|
|
72182
|
-
viewer.selection.clear();
|
|
72183
|
-
e.stopPropagation();
|
|
72184
|
-
};
|
|
72185
72160
|
const onShowAllBtn = (e) => {
|
|
72186
72161
|
props.isolation.clear("contextMenu");
|
|
72187
72162
|
e.stopPropagation();
|
|
72188
72163
|
};
|
|
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
72164
|
const onMeasureDeleteBtn = (e) => {
|
|
72197
72165
|
viewer.gizmos.measure.abort();
|
|
72198
72166
|
};
|
|
72199
|
-
const onFitSectionToSelectionBtn = (e) => {
|
|
72200
|
-
const box = viewer.selection.getBoundingBox();
|
|
72201
|
-
if (box) {
|
|
72202
|
-
viewer.gizmos.sectionBox.fitBox(box);
|
|
72203
|
-
}
|
|
72204
|
-
};
|
|
72205
72167
|
const createButton2 = (button) => {
|
|
72206
72168
|
if (!button.enabled) return null;
|
|
72207
72169
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -72248,10 +72210,10 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72248
72210
|
},
|
|
72249
72211
|
{
|
|
72250
72212
|
id: contextMenuElementIds.zoomToFit,
|
|
72251
|
-
label: "
|
|
72213
|
+
label: "Focus Camera",
|
|
72252
72214
|
keyboard: "F",
|
|
72253
72215
|
action: onCameraFrameBtn,
|
|
72254
|
-
enabled:
|
|
72216
|
+
enabled: hasSelection
|
|
72255
72217
|
},
|
|
72256
72218
|
{
|
|
72257
72219
|
id: contextMenuElementIds.dividerSelection,
|
|
@@ -72285,13 +72247,6 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72285
72247
|
action: onSelectionShowBtn,
|
|
72286
72248
|
enabled: hasSelection && !hasVisibleSelection
|
|
72287
72249
|
},
|
|
72288
|
-
{
|
|
72289
|
-
id: contextMenuElementIds.clearSelection,
|
|
72290
|
-
label: "Clear Selection",
|
|
72291
|
-
keyboard: "Esc",
|
|
72292
|
-
action: onSelectionClearBtn,
|
|
72293
|
-
enabled: hasSelection
|
|
72294
|
-
},
|
|
72295
72250
|
{
|
|
72296
72251
|
id: contextMenuElementIds.showAll,
|
|
72297
72252
|
label: "Show All",
|
|
@@ -72306,31 +72261,6 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
72306
72261
|
keyboard: "",
|
|
72307
72262
|
action: onMeasureDeleteBtn,
|
|
72308
72263
|
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
72264
|
}
|
|
72335
72265
|
];
|
|
72336
72266
|
elements = ((_c = props.customization) == null ? void 0 : _c.call(props, elements)) ?? elements;
|