@itwin/ecschema-rpcinterface-tests 5.0.0-dev.115 → 5.0.0-dev.116
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/lib/dist/bundled-tests.js +263 -209
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +15 -15
|
@@ -170772,6 +170772,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
170772
170772
|
/* harmony import */ var _SelectTool__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./SelectTool */ "../../core/frontend/lib/esm/tools/SelectTool.js");
|
|
170773
170773
|
/* harmony import */ var _Tool__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Tool */ "../../core/frontend/lib/esm/tools/Tool.js");
|
|
170774
170774
|
/* harmony import */ var _ToolAssistance__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ToolAssistance */ "../../core/frontend/lib/esm/tools/ToolAssistance.js");
|
|
170775
|
+
/* harmony import */ var _ToolSettings__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./ToolSettings */ "../../core/frontend/lib/esm/tools/ToolSettings.js");
|
|
170775
170776
|
/*---------------------------------------------------------------------------------------------
|
|
170776
170777
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
170777
170778
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -170792,6 +170793,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
170792
170793
|
|
|
170793
170794
|
|
|
170794
170795
|
|
|
170796
|
+
|
|
170795
170797
|
/** Identifies the source of the elements in the agenda.
|
|
170796
170798
|
* @public
|
|
170797
170799
|
*/
|
|
@@ -171189,12 +171191,105 @@ class ElementSetTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Primiti
|
|
|
171189
171191
|
await this.onAgendaModified();
|
|
171190
171192
|
return true;
|
|
171191
171193
|
}
|
|
171192
|
-
/** Get
|
|
171193
|
-
|
|
171194
|
-
|
|
171195
|
-
|
|
171194
|
+
/** Get ids of spatial elements to process from a clip volume created by drag box selection. */
|
|
171195
|
+
static async getVolumeSelectionCandidates(vp, origin, corner, allowOverlaps, filter) {
|
|
171196
|
+
const contents = new Set();
|
|
171197
|
+
if (!vp.view.isSpatialView())
|
|
171198
|
+
return contents;
|
|
171199
|
+
const boxRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Range2d.createXYXY(origin.x, origin.y, corner.x, corner.y);
|
|
171200
|
+
if (boxRange.isNull || boxRange.isAlmostZeroX || boxRange.isAlmostZeroY)
|
|
171201
|
+
return contents;
|
|
171202
|
+
const getClipPlane = (viewPt, viewDir, negate) => {
|
|
171203
|
+
const point = vp.viewToWorld(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Point3d.createFrom(viewPt));
|
|
171204
|
+
const boresite = _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.getBoresite(point, vp);
|
|
171205
|
+
const normal = viewDir.crossProduct(boresite.direction);
|
|
171206
|
+
if (negate)
|
|
171207
|
+
normal.negate(normal);
|
|
171208
|
+
return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ClipPlane.createNormalAndPoint(normal, point);
|
|
171209
|
+
};
|
|
171210
|
+
const planeSet = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ConvexClipPlaneSet.createEmpty();
|
|
171211
|
+
planeSet.addPlaneToConvexSet(getClipPlane(boxRange.low, vp.rotation.rowX(), true));
|
|
171212
|
+
planeSet.addPlaneToConvexSet(getClipPlane(boxRange.low, vp.rotation.rowY(), true));
|
|
171213
|
+
planeSet.addPlaneToConvexSet(getClipPlane(boxRange.high, vp.rotation.rowX(), false));
|
|
171214
|
+
planeSet.addPlaneToConvexSet(getClipPlane(boxRange.high, vp.rotation.rowY(), false));
|
|
171215
|
+
if (0 === planeSet.planes.length)
|
|
171216
|
+
return contents;
|
|
171217
|
+
const clip = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ClipVector.createCapture([_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ClipPrimitive.createCapture(planeSet)]);
|
|
171218
|
+
const viewRange = vp.computeViewRange();
|
|
171219
|
+
const range = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ClipUtilities.rangeOfClipperIntersectionWithRange(clip, viewRange);
|
|
171220
|
+
if (range.isNull)
|
|
171221
|
+
return contents;
|
|
171222
|
+
// TODO: Possible to make UnionOfComplexClipPlaneSets from view clip and planes work and remove 2nd containment check?
|
|
171223
|
+
const viewClip = (vp.viewFlags.clipVolume ? vp.view.getViewClip()?.clone() : undefined);
|
|
171224
|
+
if (viewClip) {
|
|
171225
|
+
const viewClipRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ClipUtilities.rangeOfClipperIntersectionWithRange(viewClip, viewRange);
|
|
171226
|
+
if (viewClipRange.isNull || !viewClipRange.intersectsRange(range))
|
|
171227
|
+
return contents;
|
|
171228
|
+
}
|
|
171229
|
+
const candidates = [];
|
|
171230
|
+
const categories = new Set();
|
|
171231
|
+
try {
|
|
171232
|
+
const viewedModels = [...vp.view.modelSelector.models].join(",");
|
|
171233
|
+
const viewedCategories = [...vp.view.categorySelector.categories].join(",");
|
|
171234
|
+
const ecsql = `SELECT e.ECInstanceId, Category.Id as category FROM bis.SpatialElement e JOIN bis.SpatialIndex i ON e.ECInstanceId=i.ECInstanceId WHERE Model.Id IN (${viewedModels}) AND Category.Id IN (${viewedCategories}) AND i.MinX <= ${range.xHigh} AND i.MinY <= ${range.yHigh} AND i.MinZ <= ${range.zHigh} AND i.MaxX >= ${range.xLow} AND i.MaxY >= ${range.yLow} AND i.MaxZ >= ${range.zLow}`;
|
|
171235
|
+
const reader = vp.iModel.createQueryReader(ecsql, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseECSqlPropertyNames });
|
|
171236
|
+
for await (const row of reader) {
|
|
171237
|
+
candidates.push(row.ECInstanceId);
|
|
171238
|
+
categories.add(row.category);
|
|
171239
|
+
}
|
|
171240
|
+
}
|
|
171241
|
+
catch { }
|
|
171242
|
+
if (0 === candidates.length)
|
|
171243
|
+
return contents;
|
|
171244
|
+
let offSubCategories;
|
|
171245
|
+
if (0 !== categories.size) {
|
|
171246
|
+
for (const categoryId of categories) {
|
|
171247
|
+
const subcategories = vp.iModel.subcategories.getSubCategories(categoryId);
|
|
171248
|
+
if (undefined === subcategories)
|
|
171249
|
+
continue;
|
|
171250
|
+
for (const subCategoryId of subcategories) {
|
|
171251
|
+
const appearance = vp.iModel.subcategories.getSubCategoryAppearance(subCategoryId);
|
|
171252
|
+
if (undefined === appearance || (!appearance.invisible && !appearance.dontLocate))
|
|
171253
|
+
continue;
|
|
171254
|
+
if (undefined === offSubCategories)
|
|
171255
|
+
offSubCategories = new Array;
|
|
171256
|
+
offSubCategories.push(subCategoryId);
|
|
171257
|
+
}
|
|
171258
|
+
}
|
|
171259
|
+
}
|
|
171260
|
+
const requestProps = {
|
|
171261
|
+
candidates,
|
|
171262
|
+
clip: clip.toJSON(),
|
|
171263
|
+
allowOverlaps,
|
|
171264
|
+
viewFlags: vp.viewFlags.toJSON(),
|
|
171265
|
+
offSubCategories,
|
|
171266
|
+
};
|
|
171267
|
+
const result = await vp.iModel.getGeometryContainment(requestProps);
|
|
171268
|
+
if (_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.SUCCESS !== result.status || undefined === result.candidatesContainment)
|
|
171269
|
+
return contents;
|
|
171270
|
+
result.candidatesContainment.forEach((status, index) => {
|
|
171271
|
+
if (_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ClipPlaneContainment.StronglyOutside !== status && (undefined === filter || filter(candidates[index])))
|
|
171272
|
+
contents.add(candidates[index]);
|
|
171273
|
+
});
|
|
171274
|
+
if (0 !== contents.size && viewClip) {
|
|
171275
|
+
requestProps.clip = viewClip.toJSON();
|
|
171276
|
+
requestProps.candidates.length = 0;
|
|
171277
|
+
for (const id of contents)
|
|
171278
|
+
requestProps.candidates.push(id);
|
|
171279
|
+
contents.clear();
|
|
171280
|
+
const resultViewClip = await vp.iModel.getGeometryContainment(requestProps);
|
|
171281
|
+
if (_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.SUCCESS !== resultViewClip.status || undefined === resultViewClip.candidatesContainment)
|
|
171282
|
+
return contents;
|
|
171283
|
+
resultViewClip.candidatesContainment.forEach((status, index) => {
|
|
171284
|
+
if (_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ClipPlaneContainment.StronglyOutside !== status)
|
|
171285
|
+
contents.add(candidates[index]);
|
|
171286
|
+
});
|
|
171287
|
+
}
|
|
171288
|
+
return contents;
|
|
171289
|
+
}
|
|
171290
|
+
/** Get ids of visible elements to process from drag box or crossing line selection. */
|
|
171291
|
+
static getAreaSelectionCandidates(vp, origin, corner, method, allowOverlaps, filter) {
|
|
171196
171292
|
let contents = new Set();
|
|
171197
|
-
// TODO: Include option to use IModelConnection.getGeometryContainment instead of readPixels. No/Yes/2dOnly...
|
|
171198
171293
|
const pts = [];
|
|
171199
171294
|
pts[0] = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Point2d(Math.floor(origin.x + 0.5), Math.floor(origin.y + 0.5));
|
|
171200
171295
|
pts[1] = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Point2d(Math.floor(corner.x + 0.5), Math.floor(corner.y + 0.5));
|
|
@@ -171217,12 +171312,12 @@ class ElementSetTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Primiti
|
|
|
171217
171312
|
return undefined; // no geometry at this location...
|
|
171218
171313
|
if (!vp.isPixelSelectable(pixel))
|
|
171219
171314
|
return undefined; // reality model, terrain, etc - not selectable
|
|
171220
|
-
if (!
|
|
171315
|
+
if (undefined !== filter && !filter(pixel.elementId))
|
|
171221
171316
|
return undefined;
|
|
171222
171317
|
return pixel.elementId;
|
|
171223
171318
|
};
|
|
171224
171319
|
if (_SelectTool__WEBPACK_IMPORTED_MODULE_10__.SelectionMethod.Box === method) {
|
|
171225
|
-
const outline =
|
|
171320
|
+
const outline = allowOverlaps ? undefined : new Set();
|
|
171226
171321
|
const offset = sRange.clone();
|
|
171227
171322
|
offset.expandInPlace(-2);
|
|
171228
171323
|
for (testPoint.x = sRange.low.x; testPoint.x <= sRange.high.x; ++testPoint.x) {
|
|
@@ -171264,6 +171359,33 @@ class ElementSetTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Primiti
|
|
|
171264
171359
|
}, true);
|
|
171265
171360
|
return contents;
|
|
171266
171361
|
}
|
|
171362
|
+
/** Get ids of elements to process from drag box or crossing line selection using either the depth buffer or clip vector...
|
|
171363
|
+
* @internal
|
|
171364
|
+
*/
|
|
171365
|
+
static async getAreaOrVolumeSelectionCandidates(vp, origin, corner, method, allowOverlaps, filter, includeDecorationsForVolume) {
|
|
171366
|
+
let contents;
|
|
171367
|
+
if (_ToolSettings__WEBPACK_IMPORTED_MODULE_13__.ToolSettings.enableVolumeSelection && _SelectTool__WEBPACK_IMPORTED_MODULE_10__.SelectionMethod.Box === method && vp.view.isSpatialView()) {
|
|
171368
|
+
contents = await ElementSetTool.getVolumeSelectionCandidates(vp, origin, corner, allowOverlaps, filter);
|
|
171369
|
+
// Use area select to identify pickable transients...
|
|
171370
|
+
if (includeDecorationsForVolume) {
|
|
171371
|
+
const acceptTransientsFilter = (id) => { return _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.isTransient(id) && (undefined === filter || filter(id)); };
|
|
171372
|
+
const transients = ElementSetTool.getAreaSelectionCandidates(vp, origin, corner, method, allowOverlaps, acceptTransientsFilter);
|
|
171373
|
+
for (const id of transients)
|
|
171374
|
+
contents.add(id);
|
|
171375
|
+
}
|
|
171376
|
+
}
|
|
171377
|
+
else {
|
|
171378
|
+
contents = ElementSetTool.getAreaSelectionCandidates(vp, origin, corner, method, allowOverlaps, filter);
|
|
171379
|
+
}
|
|
171380
|
+
return contents;
|
|
171381
|
+
}
|
|
171382
|
+
/** Get element ids to process from drag box or crossing line selection.
|
|
171383
|
+
* Sub-classes may override to support selection scopes or apply tool specific filtering.
|
|
171384
|
+
*/
|
|
171385
|
+
async getDragSelectCandidates(vp, origin, corner, method, overlap) {
|
|
171386
|
+
const filter = (id) => { return this.isElementIdValid(id, ModifyElementSource.DragSelect); };
|
|
171387
|
+
return ElementSetTool.getAreaOrVolumeSelectionCandidates(vp, origin, corner, method, overlap, filter, _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.locateManager.options.allowDecorations);
|
|
171388
|
+
}
|
|
171267
171389
|
/** Populate [[ElementSetTool.agenda]] by drag box or crossing line information.
|
|
171268
171390
|
* @see [[ElementSetTool.getDragSelectCandidates]] to filter or augment the set of elements.
|
|
171269
171391
|
*/
|
|
@@ -173587,17 +173709,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
173587
173709
|
/* harmony export */ SelectionTool: () => (/* binding */ SelectionTool)
|
|
173588
173710
|
/* harmony export */ });
|
|
173589
173711
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
173590
|
-
/* harmony import */ var
|
|
173591
|
-
/* harmony import */ var
|
|
173592
|
-
/* harmony import */ var
|
|
173593
|
-
/* harmony import */ var
|
|
173594
|
-
/* harmony import */ var
|
|
173595
|
-
/* harmony import */ var
|
|
173596
|
-
/* harmony import */ var
|
|
173597
|
-
/* harmony import */ var
|
|
173598
|
-
/* harmony import */ var
|
|
173599
|
-
/* harmony import */ var _ToolAdmin__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ToolAdmin */ "../../core/frontend/lib/esm/tools/ToolAdmin.js");
|
|
173600
|
-
/* harmony import */ var _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./ToolAssistance */ "../../core/frontend/lib/esm/tools/ToolAssistance.js");
|
|
173712
|
+
/* harmony import */ var _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-common */ "../../core/common/lib/esm/core-common.js");
|
|
173713
|
+
/* harmony import */ var _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @itwin/appui-abstract */ "../../ui/appui-abstract/lib/esm/appui-abstract.js");
|
|
173714
|
+
/* harmony import */ var _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ElementLocateManager */ "../../core/frontend/lib/esm/ElementLocateManager.js");
|
|
173715
|
+
/* harmony import */ var _IModelApp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../IModelApp */ "../../core/frontend/lib/esm/IModelApp.js");
|
|
173716
|
+
/* harmony import */ var _PrimitiveTool__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./PrimitiveTool */ "../../core/frontend/lib/esm/tools/PrimitiveTool.js");
|
|
173717
|
+
/* harmony import */ var _Tool__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Tool */ "../../core/frontend/lib/esm/tools/Tool.js");
|
|
173718
|
+
/* harmony import */ var _ToolAdmin__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ToolAdmin */ "../../core/frontend/lib/esm/tools/ToolAdmin.js");
|
|
173719
|
+
/* harmony import */ var _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ToolAssistance */ "../../core/frontend/lib/esm/tools/ToolAssistance.js");
|
|
173720
|
+
/* harmony import */ var _ElementSetTool__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ElementSetTool */ "../../core/frontend/lib/esm/tools/ElementSetTool.js");
|
|
173601
173721
|
/*---------------------------------------------------------------------------------------------
|
|
173602
173722
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
173603
173723
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -173615,8 +173735,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
173615
173735
|
|
|
173616
173736
|
|
|
173617
173737
|
|
|
173618
|
-
|
|
173619
|
-
|
|
173620
173738
|
// cSpell:ignore buttongroup
|
|
173621
173739
|
/** The method for choosing elements with the [[SelectionTool]]
|
|
173622
173740
|
* @public
|
|
@@ -173662,7 +173780,7 @@ var SelectionProcessing;
|
|
|
173662
173780
|
/** Tool for picking a set of elements of interest, selected by the user.
|
|
173663
173781
|
* @public
|
|
173664
173782
|
*/
|
|
173665
|
-
class SelectionTool extends
|
|
173783
|
+
class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_5__.PrimitiveTool {
|
|
173666
173784
|
static hidden = false;
|
|
173667
173785
|
static toolId = "Select";
|
|
173668
173786
|
static iconSpec = "icon-cursor";
|
|
@@ -173681,7 +173799,7 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
173681
173799
|
set selectionMethod(method) { this._selectionMethodValue.value = method; }
|
|
173682
173800
|
get selectionMode() { return this._selectionModeValue.value; }
|
|
173683
173801
|
set selectionMode(mode) { this._selectionModeValue.value = mode; }
|
|
173684
|
-
static methodsMessage(str) { return
|
|
173802
|
+
static methodsMessage(str) { return _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate(`ElementSet.SelectionMethods.${str}`); }
|
|
173685
173803
|
static _methodsName = "selectionMethods";
|
|
173686
173804
|
/* The property descriptions used to generate ToolSettings UI. */
|
|
173687
173805
|
static _getMethodsDescription() {
|
|
@@ -173692,14 +173810,14 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
173692
173810
|
editor: {
|
|
173693
173811
|
name: "enum-buttongroup",
|
|
173694
173812
|
params: [{
|
|
173695
|
-
type:
|
|
173813
|
+
type: _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_2__.PropertyEditorParamTypes.ButtonGroupData,
|
|
173696
173814
|
buttons: [
|
|
173697
173815
|
{ iconSpec: "icon-select-single" },
|
|
173698
173816
|
{ iconSpec: "icon-select-line" },
|
|
173699
173817
|
{ iconSpec: "icon-select-box" },
|
|
173700
173818
|
],
|
|
173701
173819
|
}, {
|
|
173702
|
-
type:
|
|
173820
|
+
type: _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_2__.PropertyEditorParamTypes.SuppressEditorLabel,
|
|
173703
173821
|
suppressLabelPlaceholder: true,
|
|
173704
173822
|
},
|
|
173705
173823
|
],
|
|
@@ -173713,7 +173831,7 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
173713
173831
|
},
|
|
173714
173832
|
};
|
|
173715
173833
|
}
|
|
173716
|
-
static modesMessage(str) { return
|
|
173834
|
+
static modesMessage(str) { return _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate(`ElementSet.SelectionModes.${str}`); }
|
|
173717
173835
|
static _modesName = "selectionModes";
|
|
173718
173836
|
/* The property descriptions used to generate ToolSettings UI. */
|
|
173719
173837
|
static _getModesDescription() {
|
|
@@ -173724,20 +173842,20 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
173724
173842
|
editor: {
|
|
173725
173843
|
name: "enum-buttongroup",
|
|
173726
173844
|
params: [{
|
|
173727
|
-
type:
|
|
173845
|
+
type: _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_2__.PropertyEditorParamTypes.ButtonGroupData,
|
|
173728
173846
|
buttons: [
|
|
173729
173847
|
{ iconSpec: "icon-replace" },
|
|
173730
173848
|
{ iconSpec: "icon-select-plus" },
|
|
173731
173849
|
{
|
|
173732
173850
|
iconSpec: "icon-select-minus",
|
|
173733
173851
|
isEnabledFunction: () => {
|
|
173734
|
-
const tool =
|
|
173735
|
-
return tool instanceof
|
|
173852
|
+
const tool = _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.activeTool;
|
|
173853
|
+
return tool instanceof _PrimitiveTool__WEBPACK_IMPORTED_MODULE_5__.PrimitiveTool ? tool.iModel.selectionSet.isActive : false;
|
|
173736
173854
|
},
|
|
173737
173855
|
},
|
|
173738
173856
|
],
|
|
173739
173857
|
}, {
|
|
173740
|
-
type:
|
|
173858
|
+
type: _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_2__.PropertyEditorParamTypes.SuppressEditorLabel,
|
|
173741
173859
|
suppressLabelPlaceholder: true,
|
|
173742
173860
|
},
|
|
173743
173861
|
],
|
|
@@ -173764,49 +173882,49 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
173764
173882
|
mainMsg += (0 === this._points.length ? "StartCorner" : "OppositeCorner");
|
|
173765
173883
|
break;
|
|
173766
173884
|
}
|
|
173767
|
-
const mainInstruction =
|
|
173885
|
+
const mainInstruction = _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstruction(this.iconSpec, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate(mainMsg));
|
|
173768
173886
|
const sections = [];
|
|
173769
173887
|
switch (method) {
|
|
173770
173888
|
case SelectionMethod.Pick:
|
|
173771
173889
|
const mousePickInstructions = [];
|
|
173772
|
-
mousePickInstructions.push(
|
|
173773
|
-
mousePickInstructions.push(
|
|
173774
|
-
mousePickInstructions.push(
|
|
173775
|
-
mousePickInstructions.push(
|
|
173890
|
+
mousePickInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.LeftClick, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.AcceptElement"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Mouse));
|
|
173891
|
+
mousePickInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.LeftClickDrag, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.BoxCorners"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Mouse));
|
|
173892
|
+
mousePickInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.RightClickDrag, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.CrossingLine"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Mouse));
|
|
173893
|
+
mousePickInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createModifierKeyInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.shiftKey, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.LeftClickDrag, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.OverlapSelection"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Mouse));
|
|
173776
173894
|
if (SelectionMode.Replace === mode) {
|
|
173777
|
-
mousePickInstructions.push(
|
|
173778
|
-
mousePickInstructions.push(
|
|
173895
|
+
mousePickInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createKeyboardInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.ctrlKeyboardInfo, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.InvertSelection"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Mouse));
|
|
173896
|
+
mousePickInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.CursorClick, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.ClearSelection"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Mouse));
|
|
173779
173897
|
}
|
|
173780
|
-
sections.push(
|
|
173898
|
+
sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createSection(mousePickInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.inputsLabel));
|
|
173781
173899
|
const touchPickInstructions = [];
|
|
173782
|
-
if (!
|
|
173783
|
-
touchPickInstructions.push(
|
|
173784
|
-
sections.push(
|
|
173900
|
+
if (!_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createTouchCursorInstructions(touchPickInstructions))
|
|
173901
|
+
touchPickInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.OneTouchTap, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.AcceptElement"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Touch));
|
|
173902
|
+
sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createSection(touchPickInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.inputsLabel));
|
|
173785
173903
|
break;
|
|
173786
173904
|
case SelectionMethod.Line:
|
|
173787
173905
|
const mouseLineInstructions = [];
|
|
173788
|
-
mouseLineInstructions.push(
|
|
173906
|
+
mouseLineInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.LeftClick, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.AcceptPoint"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Mouse));
|
|
173789
173907
|
if (SelectionMode.Replace === mode)
|
|
173790
|
-
mouseLineInstructions.push(
|
|
173791
|
-
sections.push(
|
|
173908
|
+
mouseLineInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createModifierKeyInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.ctrlKey, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.LeftClick, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.InvertSelection"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Mouse));
|
|
173909
|
+
sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createSection(mouseLineInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.inputsLabel));
|
|
173792
173910
|
const touchLineInstructions = [];
|
|
173793
|
-
touchLineInstructions.push(
|
|
173794
|
-
sections.push(
|
|
173911
|
+
touchLineInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.OneTouchDrag, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.AcceptPoint"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Touch));
|
|
173912
|
+
sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createSection(touchLineInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.inputsLabel));
|
|
173795
173913
|
break;
|
|
173796
173914
|
case SelectionMethod.Box:
|
|
173797
173915
|
const mouseBoxInstructions = [];
|
|
173798
|
-
mouseBoxInstructions.push(
|
|
173799
|
-
mouseBoxInstructions.push(
|
|
173916
|
+
mouseBoxInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.LeftClick, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.AcceptPoint"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Mouse));
|
|
173917
|
+
mouseBoxInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createModifierKeyInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.shiftKey, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.LeftClick, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.OverlapSelection"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Mouse));
|
|
173800
173918
|
if (SelectionMode.Replace === mode)
|
|
173801
|
-
mouseBoxInstructions.push(
|
|
173802
|
-
sections.push(
|
|
173919
|
+
mouseBoxInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createModifierKeyInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.ctrlKey, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.LeftClick, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.InvertSelection"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Mouse));
|
|
173920
|
+
sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createSection(mouseBoxInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.inputsLabel));
|
|
173803
173921
|
const touchBoxInstructions = [];
|
|
173804
|
-
touchBoxInstructions.push(
|
|
173805
|
-
sections.push(
|
|
173922
|
+
touchBoxInstructions.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstruction(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceImage.OneTouchDrag, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate("ElementSet.Inputs.AcceptPoint"), false, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistanceInputMethod.Touch));
|
|
173923
|
+
sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createSection(touchBoxInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.inputsLabel));
|
|
173806
173924
|
break;
|
|
173807
173925
|
}
|
|
173808
|
-
const instructions =
|
|
173809
|
-
|
|
173926
|
+
const instructions = _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstructions(mainInstruction, sections);
|
|
173927
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.notifications.setToolAssistance(instructions);
|
|
173810
173928
|
}
|
|
173811
173929
|
initSelectTool() {
|
|
173812
173930
|
const method = this.selectionMethod;
|
|
@@ -173814,8 +173932,8 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
173814
173932
|
const enableLocate = SelectionMethod.Pick === method;
|
|
173815
173933
|
this._isSelectByPoints = false;
|
|
173816
173934
|
this._points.length = 0;
|
|
173817
|
-
this.initLocateElements(enableLocate, false, enableLocate ? "default" :
|
|
173818
|
-
|
|
173935
|
+
this.initLocateElements(enableLocate, false, enableLocate ? "default" : _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.viewManager.crossHairCursor, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoordinateLockOverrides.All);
|
|
173936
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.locateManager.options.allowDecorations = true; // Always locate to display tool tip even if we reject for adding to selection set...
|
|
173819
173937
|
this.showPrompt(mode, method);
|
|
173820
173938
|
}
|
|
173821
173939
|
processMiss(_ev) {
|
|
@@ -173860,13 +173978,13 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
173860
173978
|
selectByPointsDecorate(context) {
|
|
173861
173979
|
if (!this._isSelectByPoints)
|
|
173862
173980
|
return;
|
|
173863
|
-
const ev = new
|
|
173864
|
-
|
|
173981
|
+
const ev = new _Tool__WEBPACK_IMPORTED_MODULE_6__.BeButtonEvent();
|
|
173982
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.fillEventFromCursorLocation(ev);
|
|
173865
173983
|
if (undefined === ev.viewport)
|
|
173866
173984
|
return;
|
|
173867
173985
|
const vp = context.viewport;
|
|
173868
|
-
const bestContrastIsBlack = (
|
|
173869
|
-
const crossingLine = (SelectionMethod.Line === this.selectionMethod || (SelectionMethod.Pick === this.selectionMethod &&
|
|
173986
|
+
const bestContrastIsBlack = (_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ColorDef.black === vp.getContrastToBackgroundColor());
|
|
173987
|
+
const crossingLine = (SelectionMethod.Line === this.selectionMethod || (SelectionMethod.Pick === this.selectionMethod && _Tool__WEBPACK_IMPORTED_MODULE_6__.BeButton.Reset === ev.button));
|
|
173870
173988
|
const overlapSelection = (crossingLine || this.useOverlapSelection(ev));
|
|
173871
173989
|
const position = vp.worldToView(this._points[0]);
|
|
173872
173990
|
position.x = Math.floor(position.x) + 0.5;
|
|
@@ -173894,111 +174012,42 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
173894
174012
|
};
|
|
173895
174013
|
context.addCanvasDecoration({ position, drawDecoration });
|
|
173896
174014
|
}
|
|
173897
|
-
selectByPointsProcess(origin, corner, ev, method, overlap) {
|
|
174015
|
+
async selectByPointsProcess(origin, corner, ev, method, overlap) {
|
|
173898
174016
|
const vp = ev.viewport;
|
|
173899
174017
|
if (!vp)
|
|
173900
|
-
return;
|
|
173901
|
-
const
|
|
173902
|
-
|
|
173903
|
-
|
|
173904
|
-
|
|
173905
|
-
|
|
173906
|
-
|
|
173907
|
-
const allowTransients = this.wantPickableDecorations();
|
|
173908
|
-
vp.readPixels(rect, _render_Pixel__WEBPACK_IMPORTED_MODULE_6__.Pixel.Selector.Feature, (pixels) => {
|
|
173909
|
-
if (undefined === pixels)
|
|
173910
|
-
return;
|
|
173911
|
-
const sRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range2d.createNull();
|
|
173912
|
-
sRange.extendPoint(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.create(vp.cssPixelsToDevicePixels(range.low.x), vp.cssPixelsToDevicePixels(range.low.y)));
|
|
173913
|
-
sRange.extendPoint(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.create(vp.cssPixelsToDevicePixels(range.high.x), vp.cssPixelsToDevicePixels(range.high.y)));
|
|
173914
|
-
pts[0].x = vp.cssPixelsToDevicePixels(pts[0].x);
|
|
173915
|
-
pts[0].y = vp.cssPixelsToDevicePixels(pts[0].y);
|
|
173916
|
-
pts[1].x = vp.cssPixelsToDevicePixels(pts[1].x);
|
|
173917
|
-
pts[1].y = vp.cssPixelsToDevicePixels(pts[1].y);
|
|
173918
|
-
let contents = new Set();
|
|
173919
|
-
const testPoint = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.createZero();
|
|
173920
|
-
const getPixelElementId = (pixel) => {
|
|
173921
|
-
if (undefined === pixel.elementId || _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.isInvalid(pixel.elementId))
|
|
173922
|
-
return undefined; // no geometry at this location...
|
|
173923
|
-
if (!allowTransients && _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.isTransient(pixel.elementId))
|
|
173924
|
-
return undefined; // tool didn't request pickable decorations...
|
|
173925
|
-
if (!vp.isPixelSelectable(pixel))
|
|
173926
|
-
return undefined; // reality model, terrain, etc - not selectable
|
|
173927
|
-
return pixel.elementId;
|
|
173928
|
-
};
|
|
173929
|
-
if (SelectionMethod.Box === method) {
|
|
173930
|
-
const outline = overlap ? undefined : new Set();
|
|
173931
|
-
const offset = sRange.clone();
|
|
173932
|
-
offset.expandInPlace(-2);
|
|
173933
|
-
for (testPoint.x = sRange.low.x; testPoint.x <= sRange.high.x; ++testPoint.x) {
|
|
173934
|
-
for (testPoint.y = sRange.low.y; testPoint.y <= sRange.high.y; ++testPoint.y) {
|
|
173935
|
-
const pixel = pixels.getPixel(testPoint.x, testPoint.y);
|
|
173936
|
-
const elementId = getPixelElementId(pixel);
|
|
173937
|
-
if (undefined === elementId)
|
|
173938
|
-
continue;
|
|
173939
|
-
if (undefined !== outline && !offset.containsPoint(testPoint))
|
|
173940
|
-
outline.add(elementId.toString());
|
|
173941
|
-
else
|
|
173942
|
-
contents.add(elementId.toString());
|
|
173943
|
-
}
|
|
173944
|
-
}
|
|
173945
|
-
if (undefined !== outline && 0 !== outline.size) {
|
|
173946
|
-
const inside = new Set();
|
|
173947
|
-
contents.forEach((id) => {
|
|
173948
|
-
if (!outline.has(id))
|
|
173949
|
-
inside.add(id);
|
|
173950
|
-
});
|
|
173951
|
-
contents = inside;
|
|
173952
|
-
}
|
|
173953
|
-
}
|
|
173954
|
-
else {
|
|
173955
|
-
const closePoint = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.createZero();
|
|
173956
|
-
for (testPoint.x = sRange.low.x; testPoint.x <= sRange.high.x; ++testPoint.x) {
|
|
173957
|
-
for (testPoint.y = sRange.low.y; testPoint.y <= sRange.high.y; ++testPoint.y) {
|
|
173958
|
-
const pixel = pixels.getPixel(testPoint.x, testPoint.y);
|
|
173959
|
-
const elementId = getPixelElementId(pixel);
|
|
173960
|
-
if (undefined === elementId)
|
|
173961
|
-
continue;
|
|
173962
|
-
const fraction = testPoint.fractionOfProjectionToLine(pts[0], pts[1], 0.0);
|
|
173963
|
-
pts[0].interpolate(fraction, pts[1], closePoint);
|
|
173964
|
-
if (closePoint.distance(testPoint) < 1.5)
|
|
173965
|
-
contents.add(elementId.toString());
|
|
173966
|
-
}
|
|
173967
|
-
}
|
|
173968
|
-
}
|
|
173969
|
-
if (0 === contents.size) {
|
|
173970
|
-
if (!ev.isControlKey && this.wantSelectionClearOnMiss(ev) && this.processMiss(ev))
|
|
173971
|
-
this.syncSelectionMode();
|
|
173972
|
-
return;
|
|
173973
|
-
}
|
|
173974
|
-
switch (this.selectionMode) {
|
|
173975
|
-
case SelectionMode.Replace:
|
|
173976
|
-
if (!ev.isControlKey)
|
|
173977
|
-
this.processSelection(contents, SelectionProcessing.ReplaceSelectionWithElement); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
173978
|
-
else
|
|
173979
|
-
this.processSelection(contents, SelectionProcessing.InvertElementInSelection); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
173980
|
-
break;
|
|
173981
|
-
case SelectionMode.Add:
|
|
173982
|
-
this.processSelection(contents, SelectionProcessing.AddElementToSelection); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
173983
|
-
break;
|
|
173984
|
-
case SelectionMode.Remove:
|
|
173985
|
-
this.processSelection(contents, SelectionProcessing.RemoveElementFromSelection); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
173986
|
-
break;
|
|
174018
|
+
return false;
|
|
174019
|
+
const filter = (id) => { return !_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.isTransient(id); };
|
|
174020
|
+
const contents = await _ElementSetTool__WEBPACK_IMPORTED_MODULE_9__.ElementSetTool.getAreaOrVolumeSelectionCandidates(vp, origin, corner, method, overlap, this.wantPickableDecorations() ? undefined : filter, this.wantPickableDecorations());
|
|
174021
|
+
if (0 === contents.size) {
|
|
174022
|
+
if (!ev.isControlKey && this.wantSelectionClearOnMiss(ev) && this.processMiss(ev)) {
|
|
174023
|
+
this.syncSelectionMode();
|
|
174024
|
+
return true;
|
|
173987
174025
|
}
|
|
173988
|
-
|
|
174026
|
+
return false;
|
|
174027
|
+
}
|
|
174028
|
+
switch (this.selectionMode) {
|
|
174029
|
+
case SelectionMode.Replace:
|
|
174030
|
+
if (!ev.isControlKey)
|
|
174031
|
+
return this.processSelection(contents, SelectionProcessing.ReplaceSelectionWithElement);
|
|
174032
|
+
return this.processSelection(contents, SelectionProcessing.InvertElementInSelection);
|
|
174033
|
+
case SelectionMode.Add:
|
|
174034
|
+
return this.processSelection(contents, SelectionProcessing.AddElementToSelection);
|
|
174035
|
+
case SelectionMode.Remove:
|
|
174036
|
+
return this.processSelection(contents, SelectionProcessing.RemoveElementFromSelection);
|
|
174037
|
+
}
|
|
173989
174038
|
}
|
|
173990
174039
|
selectByPointsStart(ev) {
|
|
173991
|
-
if (
|
|
174040
|
+
if (_Tool__WEBPACK_IMPORTED_MODULE_6__.BeButton.Data !== ev.button && _Tool__WEBPACK_IMPORTED_MODULE_6__.BeButton.Reset !== ev.button)
|
|
173992
174041
|
return false;
|
|
173993
174042
|
this._points.length = 0;
|
|
173994
174043
|
this._points.push(ev.point.clone());
|
|
173995
174044
|
this._isSelectByPoints = true;
|
|
173996
|
-
|
|
173997
|
-
|
|
174045
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.accuSnap.enableLocate(false);
|
|
174046
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.setLocateCircleOn(false);
|
|
173998
174047
|
this.showPrompt(this.selectionMode, this.selectionMethod);
|
|
173999
174048
|
return true;
|
|
174000
174049
|
}
|
|
174001
|
-
selectByPointsEnd(ev) {
|
|
174050
|
+
async selectByPointsEnd(ev) {
|
|
174002
174051
|
if (!this._isSelectByPoints)
|
|
174003
174052
|
return false;
|
|
174004
174053
|
const vp = ev.viewport;
|
|
@@ -174008,10 +174057,10 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
174008
174057
|
}
|
|
174009
174058
|
const origin = vp.worldToView(this._points[0]);
|
|
174010
174059
|
const corner = vp.worldToView(ev.point);
|
|
174011
|
-
if (SelectionMethod.Line === this.selectionMethod || (SelectionMethod.Pick === this.selectionMethod &&
|
|
174012
|
-
this.selectByPointsProcess(origin, corner, ev, SelectionMethod.Line, true);
|
|
174060
|
+
if (SelectionMethod.Line === this.selectionMethod || (SelectionMethod.Pick === this.selectionMethod && _Tool__WEBPACK_IMPORTED_MODULE_6__.BeButton.Reset === ev.button))
|
|
174061
|
+
await this.selectByPointsProcess(origin, corner, ev, SelectionMethod.Line, true);
|
|
174013
174062
|
else
|
|
174014
|
-
this.selectByPointsProcess(origin, corner, ev, SelectionMethod.Box, this.useOverlapSelection(ev));
|
|
174063
|
+
await this.selectByPointsProcess(origin, corner, ev, SelectionMethod.Box, this.useOverlapSelection(ev));
|
|
174015
174064
|
this.initSelectTool();
|
|
174016
174065
|
vp.invalidateDecorations();
|
|
174017
174066
|
return true;
|
|
@@ -174022,14 +174071,14 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
174022
174071
|
}
|
|
174023
174072
|
async selectDecoration(ev, currHit) {
|
|
174024
174073
|
if (undefined === currHit)
|
|
174025
|
-
currHit = await
|
|
174074
|
+
currHit = await _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.locateManager.doLocate(new _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateResponse(), true, ev.point, ev.viewport, ev.inputSource);
|
|
174026
174075
|
if (undefined !== currHit)
|
|
174027
|
-
return (currHit.isElementHit ?
|
|
174028
|
-
return
|
|
174076
|
+
return (currHit.isElementHit ? _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.viewManager.overrideElementButtonEvent(currHit, ev) : _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.viewManager.onDecorationButtonEvent(currHit, ev));
|
|
174077
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No;
|
|
174029
174078
|
}
|
|
174030
174079
|
async processHit(ev, hit) {
|
|
174031
174080
|
if (hit.isModelHit || hit.isMapHit)
|
|
174032
|
-
return
|
|
174081
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No; // model hit = terrain, reality models, background maps, etc - not selectable
|
|
174033
174082
|
switch (this.selectionMode) {
|
|
174034
174083
|
case SelectionMode.Replace:
|
|
174035
174084
|
await this.processSelection(hit.sourceId, ev.isControlKey ? SelectionProcessing.InvertElementInSelection : SelectionProcessing.ReplaceSelectionWithElement);
|
|
@@ -174041,59 +174090,59 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
174041
174090
|
await this.processSelection(hit.sourceId, SelectionProcessing.RemoveElementFromSelection);
|
|
174042
174091
|
break;
|
|
174043
174092
|
}
|
|
174044
|
-
return
|
|
174093
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
|
|
174045
174094
|
}
|
|
174046
174095
|
async onMouseStartDrag(ev) {
|
|
174047
|
-
|
|
174048
|
-
if (
|
|
174049
|
-
return
|
|
174050
|
-
if (
|
|
174051
|
-
return
|
|
174052
|
-
return this.selectByPointsStart(ev) ?
|
|
174096
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.accuSnap.clear(); // Need to test hit at start drag location, not current AccuSnap...
|
|
174097
|
+
if (_Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes === await this.selectDecoration(ev))
|
|
174098
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
|
|
174099
|
+
if (_Tool__WEBPACK_IMPORTED_MODULE_6__.InputSource.Touch === ev.inputSource && SelectionMethod.Pick === this.selectionMethod)
|
|
174100
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No; // Require method change for line/box selection...allow IdleTool to handle touch move...
|
|
174101
|
+
return this.selectByPointsStart(ev) ? _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes : _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No;
|
|
174053
174102
|
}
|
|
174054
174103
|
async onMouseEndDrag(ev) {
|
|
174055
|
-
return this.selectByPointsEnd(ev) ?
|
|
174104
|
+
return await this.selectByPointsEnd(ev) ? _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes : _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No;
|
|
174056
174105
|
}
|
|
174057
174106
|
async onDataButtonUp(ev) {
|
|
174058
174107
|
if (undefined === ev.viewport)
|
|
174059
|
-
return
|
|
174060
|
-
if (this.selectByPointsEnd(ev))
|
|
174061
|
-
return
|
|
174108
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No;
|
|
174109
|
+
if (await this.selectByPointsEnd(ev))
|
|
174110
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
|
|
174062
174111
|
if (SelectionMethod.Pick !== this.selectionMethod) {
|
|
174063
174112
|
if (!ev.isControlKey && this.wantSelectionClearOnMiss(ev) && this.processMiss(ev))
|
|
174064
174113
|
this.syncSelectionMode();
|
|
174065
|
-
if (
|
|
174114
|
+
if (_Tool__WEBPACK_IMPORTED_MODULE_6__.InputSource.Touch !== ev.inputSource)
|
|
174066
174115
|
this.selectByPointsStart(ev); // Require touch move and not tap to start crossing line/box selection...
|
|
174067
|
-
return
|
|
174116
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
|
|
174068
174117
|
}
|
|
174069
|
-
const hit = await
|
|
174118
|
+
const hit = await _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.locateManager.doLocate(new _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateResponse(), true, ev.point, ev.viewport, ev.inputSource);
|
|
174070
174119
|
if (hit !== undefined) {
|
|
174071
|
-
if (
|
|
174072
|
-
return
|
|
174073
|
-
if (
|
|
174074
|
-
return
|
|
174120
|
+
if (_Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes === await this.selectDecoration(ev, hit))
|
|
174121
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
|
|
174122
|
+
if (_Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes === await this.processHit(ev, hit))
|
|
174123
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
|
|
174075
174124
|
}
|
|
174076
174125
|
if (!ev.isControlKey && this.wantSelectionClearOnMiss(ev) && this.processMiss(ev))
|
|
174077
174126
|
this.syncSelectionMode();
|
|
174078
|
-
return
|
|
174127
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
|
|
174079
174128
|
}
|
|
174080
174129
|
async onResetButtonUp(ev) {
|
|
174081
174130
|
if (this._isSelectByPoints) {
|
|
174082
174131
|
if (undefined !== ev.viewport)
|
|
174083
174132
|
ev.viewport.invalidateDecorations();
|
|
174084
174133
|
this.initSelectTool();
|
|
174085
|
-
return
|
|
174134
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
|
|
174086
174135
|
}
|
|
174087
174136
|
// Check for overlapping hits...
|
|
174088
|
-
const lastHit = SelectionMode.Remove === this.selectionMode ? undefined :
|
|
174137
|
+
const lastHit = SelectionMode.Remove === this.selectionMode ? undefined : _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.locateManager.currHit;
|
|
174089
174138
|
if (lastHit && this.iModel.selectionSet.elements.has(lastHit.sourceId)) {
|
|
174090
|
-
const autoHit =
|
|
174139
|
+
const autoHit = _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.accuSnap.currHit;
|
|
174091
174140
|
// Play nice w/auto-locate, only remove previous hit if not currently auto-locating or over previous hit
|
|
174092
174141
|
if (undefined === autoHit || autoHit.isSameHit(lastHit)) {
|
|
174093
|
-
const response = new
|
|
174142
|
+
const response = new _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateResponse();
|
|
174094
174143
|
let nextHit;
|
|
174095
174144
|
do {
|
|
174096
|
-
nextHit = await
|
|
174145
|
+
nextHit = await _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.locateManager.doLocate(response, false, ev.point, ev.viewport, ev.inputSource);
|
|
174097
174146
|
} while (undefined !== nextHit && (nextHit.isModelHit || nextHit.isMapHit)); // Ignore reality models, terrain, maps, etc.
|
|
174098
174147
|
// remove element(s) previously selected if in replace mode, or if we have a next element in add mode
|
|
174099
174148
|
if (SelectionMode.Replace === this.selectionMode || undefined !== nextHit)
|
|
@@ -174101,69 +174150,69 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
174101
174150
|
// add element(s) located via reset button
|
|
174102
174151
|
if (undefined !== nextHit)
|
|
174103
174152
|
await this.processSelection(nextHit.sourceId, SelectionProcessing.AddElementToSelection);
|
|
174104
|
-
return
|
|
174153
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
|
|
174105
174154
|
}
|
|
174106
174155
|
}
|
|
174107
|
-
if (
|
|
174108
|
-
return
|
|
174109
|
-
await
|
|
174110
|
-
return
|
|
174156
|
+
if (_Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes === await this.selectDecoration(ev, _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.accuSnap.currHit))
|
|
174157
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
|
|
174158
|
+
await _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.accuSnap.resetButton();
|
|
174159
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
|
|
174111
174160
|
}
|
|
174112
174161
|
async onSuspend() {
|
|
174113
174162
|
this._isSuspended = true;
|
|
174114
174163
|
if (this.wantEditManipulators())
|
|
174115
|
-
|
|
174164
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.manipulatorToolEvent.raiseEvent(this, _ToolAdmin__WEBPACK_IMPORTED_MODULE_7__.ManipulatorToolEvent.Suspend);
|
|
174116
174165
|
}
|
|
174117
174166
|
async onUnsuspend() {
|
|
174118
174167
|
this._isSuspended = false;
|
|
174119
174168
|
if (this.wantEditManipulators())
|
|
174120
|
-
|
|
174169
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.manipulatorToolEvent.raiseEvent(this, _ToolAdmin__WEBPACK_IMPORTED_MODULE_7__.ManipulatorToolEvent.Unsuspend);
|
|
174121
174170
|
this.showPrompt(this.selectionMode, this.selectionMethod);
|
|
174122
174171
|
}
|
|
174123
174172
|
async onTouchMoveStart(ev, startEv) {
|
|
174124
174173
|
if (startEv.isSingleTouch && !this._isSelectByPoints)
|
|
174125
|
-
await
|
|
174126
|
-
return (this._isSuspended || this._isSelectByPoints) ?
|
|
174174
|
+
await _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.convertTouchMoveStartToButtonDownAndMotion(startEv, ev);
|
|
174175
|
+
return (this._isSuspended || this._isSelectByPoints) ? _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes : _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No;
|
|
174127
174176
|
}
|
|
174128
174177
|
async onTouchMove(ev) {
|
|
174129
174178
|
if (this._isSelectByPoints)
|
|
174130
|
-
return
|
|
174179
|
+
return _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.convertTouchMoveToMotion(ev);
|
|
174131
174180
|
}
|
|
174132
174181
|
async onTouchComplete(ev) {
|
|
174133
174182
|
if (this._isSelectByPoints)
|
|
174134
|
-
return
|
|
174183
|
+
return _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.convertTouchEndToButtonUp(ev);
|
|
174135
174184
|
}
|
|
174136
174185
|
async onTouchCancel(ev) {
|
|
174137
174186
|
if (this._isSelectByPoints)
|
|
174138
|
-
return
|
|
174187
|
+
return _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.convertTouchEndToButtonUp(ev, _Tool__WEBPACK_IMPORTED_MODULE_6__.BeButton.Reset);
|
|
174139
174188
|
}
|
|
174140
174189
|
decorate(context) { this.selectByPointsDecorate(context); }
|
|
174141
174190
|
async onModifierKeyTransition(_wentDown, modifier, _event) {
|
|
174142
|
-
return (modifier ===
|
|
174191
|
+
return (modifier === _Tool__WEBPACK_IMPORTED_MODULE_6__.BeModifierKeys.Shift && this._isSelectByPoints) ? _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes : _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No;
|
|
174143
174192
|
}
|
|
174144
174193
|
async filterHit(hit, out) {
|
|
174145
174194
|
if (!this.wantPickableDecorations() && !hit.isElementHit)
|
|
174146
|
-
return
|
|
174195
|
+
return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateFilterStatus.Reject;
|
|
174147
174196
|
const mode = this.selectionMode;
|
|
174148
174197
|
if (SelectionMode.Replace === mode)
|
|
174149
|
-
return
|
|
174198
|
+
return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateFilterStatus.Accept;
|
|
174150
174199
|
const isSelected = this.iModel.selectionSet.elements.has(hit.sourceId);
|
|
174151
|
-
const status = ((SelectionMode.Add === mode ? !isSelected : isSelected) ?
|
|
174152
|
-
if (out &&
|
|
174153
|
-
out.explanation =
|
|
174200
|
+
const status = ((SelectionMode.Add === mode ? !isSelected : isSelected) ? _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateFilterStatus.Accept : _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateFilterStatus.Reject);
|
|
174201
|
+
if (out && _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateFilterStatus.Reject === status)
|
|
174202
|
+
out.explanation = _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate(`ElementSet.Error.${isSelected ? "AlreadySelected" : "NotSelected"}`);
|
|
174154
174203
|
return status;
|
|
174155
174204
|
}
|
|
174156
174205
|
async onRestartTool() { return this.exitTool(); }
|
|
174157
174206
|
async onCleanup() {
|
|
174158
174207
|
if (this.wantEditManipulators())
|
|
174159
|
-
|
|
174208
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.manipulatorToolEvent.raiseEvent(this, _ToolAdmin__WEBPACK_IMPORTED_MODULE_7__.ManipulatorToolEvent.Stop);
|
|
174160
174209
|
}
|
|
174161
174210
|
async onPostInstall() {
|
|
174162
174211
|
await super.onPostInstall();
|
|
174163
174212
|
if (!this.targetView)
|
|
174164
174213
|
return;
|
|
174165
174214
|
if (this.wantEditManipulators())
|
|
174166
|
-
|
|
174215
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.manipulatorToolEvent.raiseEvent(this, _ToolAdmin__WEBPACK_IMPORTED_MODULE_7__.ManipulatorToolEvent.Start);
|
|
174167
174216
|
this.initSelectTool();
|
|
174168
174217
|
}
|
|
174169
174218
|
static async startTool() { return new SelectionTool().run(); }
|
|
@@ -174175,7 +174224,7 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
174175
174224
|
}
|
|
174176
174225
|
if (this.wantToolSettings()) {
|
|
174177
174226
|
const syncMode = { value: this._selectionModeValue, propertyName: SelectionTool._modesName };
|
|
174178
|
-
|
|
174227
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.toolSettingsState.saveToolSettingProperty(this.toolId, syncMode);
|
|
174179
174228
|
this.syncToolSettingsProperties([syncMode]);
|
|
174180
174229
|
}
|
|
174181
174230
|
}
|
|
@@ -174186,14 +174235,14 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
174186
174235
|
if (!this.wantToolSettings())
|
|
174187
174236
|
return undefined;
|
|
174188
174237
|
// load latest values from session
|
|
174189
|
-
|
|
174238
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.toolSettingsState.getInitialToolSettingValues(this.toolId, [SelectionTool._modesName])?.forEach((value) => {
|
|
174190
174239
|
if (value.propertyName === SelectionTool._modesName)
|
|
174191
174240
|
this._selectionModeValue = value.value;
|
|
174192
174241
|
});
|
|
174193
174242
|
// Make sure a mode of SelectionMode.Remove is valid
|
|
174194
174243
|
if (SelectionMode.Remove === this.selectionMode && !this.iModel.selectionSet.isActive) {
|
|
174195
174244
|
this.selectionMode = SelectionMode.Replace;
|
|
174196
|
-
|
|
174245
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.toolSettingsState.saveToolSettingProperty(this.toolId, { propertyName: SelectionTool._modesName, value: this._selectionModeValue });
|
|
174197
174246
|
}
|
|
174198
174247
|
const toolSettings = new Array();
|
|
174199
174248
|
// generate 3 columns - label will be placed in column 0 and button group editors in columns 1 and 2.
|
|
@@ -174212,7 +174261,7 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
174212
174261
|
if (this._selectionMethodValue) {
|
|
174213
174262
|
const currWantManipulators = this.wantEditManipulators();
|
|
174214
174263
|
if (saveWantManipulators !== currWantManipulators)
|
|
174215
|
-
|
|
174264
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.manipulatorToolEvent.raiseEvent(this, currWantManipulators ? _ToolAdmin__WEBPACK_IMPORTED_MODULE_7__.ManipulatorToolEvent.Start : _ToolAdmin__WEBPACK_IMPORTED_MODULE_7__.ManipulatorToolEvent.Stop);
|
|
174216
174265
|
changed = true;
|
|
174217
174266
|
}
|
|
174218
174267
|
}
|
|
@@ -174220,7 +174269,7 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
174220
174269
|
this._selectionModeValue = updatedValue.value;
|
|
174221
174270
|
if (this._selectionModeValue) {
|
|
174222
174271
|
if (this.wantToolSettings())
|
|
174223
|
-
|
|
174272
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.toolSettingsState.saveToolSettingProperty(this.toolId, { propertyName: SelectionTool._modesName, value: this._selectionModeValue });
|
|
174224
174273
|
changed = true;
|
|
174225
174274
|
}
|
|
174226
174275
|
}
|
|
@@ -177363,6 +177412,11 @@ class ToolSettings {
|
|
|
177363
177412
|
};
|
|
177364
177413
|
/** Maximum number of times in a second the accuSnap tool's onMotion function is called. */
|
|
177365
177414
|
static maxOnMotionSnapCallPerSecond = 15;
|
|
177415
|
+
/** If true, drag box selection will accept spatial elements that are inside or overlap a clip volume instead of only what is visible in the view.
|
|
177416
|
+
* @note Enabling is not recommended for web applications.
|
|
177417
|
+
* @beta
|
|
177418
|
+
*/
|
|
177419
|
+
static enableVolumeSelection = false;
|
|
177366
177420
|
}
|
|
177367
177421
|
|
|
177368
177422
|
|
|
@@ -313158,7 +313212,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
313158
313212
|
/***/ ((module) => {
|
|
313159
313213
|
|
|
313160
313214
|
"use strict";
|
|
313161
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.0.0-dev.
|
|
313215
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.0.0-dev.116","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2022 --outDir lib/esm","clean":"rimraf -g lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/eslint-plugin":"5.0.0-dev.1","@types/chai-as-promised":"^7","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.13.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^6.0.1","source-map-loader":"^5.0.0","typescript":"~5.6.2","typemoq":"^2.1.0","vitest":"^3.0.6","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"2.2.0","webpack":"^5.97.1"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.2.4","@itwin/object-storage-core":"^2.3.0","@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
|
|
313162
313216
|
|
|
313163
313217
|
/***/ })
|
|
313164
313218
|
|