@itwin/rpcinterface-full-stack-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 +264 -210
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +13 -13
|
@@ -200407,6 +200407,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
200407
200407
|
/* harmony import */ var _SelectTool__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./SelectTool */ "../../core/frontend/lib/esm/tools/SelectTool.js");
|
|
200408
200408
|
/* harmony import */ var _Tool__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Tool */ "../../core/frontend/lib/esm/tools/Tool.js");
|
|
200409
200409
|
/* harmony import */ var _ToolAssistance__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ToolAssistance */ "../../core/frontend/lib/esm/tools/ToolAssistance.js");
|
|
200410
|
+
/* harmony import */ var _ToolSettings__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./ToolSettings */ "../../core/frontend/lib/esm/tools/ToolSettings.js");
|
|
200410
200411
|
/*---------------------------------------------------------------------------------------------
|
|
200411
200412
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
200412
200413
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -200427,6 +200428,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
200427
200428
|
|
|
200428
200429
|
|
|
200429
200430
|
|
|
200431
|
+
|
|
200430
200432
|
/** Identifies the source of the elements in the agenda.
|
|
200431
200433
|
* @public
|
|
200432
200434
|
*/
|
|
@@ -200824,12 +200826,105 @@ class ElementSetTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Primiti
|
|
|
200824
200826
|
await this.onAgendaModified();
|
|
200825
200827
|
return true;
|
|
200826
200828
|
}
|
|
200827
|
-
/** Get
|
|
200828
|
-
|
|
200829
|
-
|
|
200830
|
-
|
|
200829
|
+
/** Get ids of spatial elements to process from a clip volume created by drag box selection. */
|
|
200830
|
+
static async getVolumeSelectionCandidates(vp, origin, corner, allowOverlaps, filter) {
|
|
200831
|
+
const contents = new Set();
|
|
200832
|
+
if (!vp.view.isSpatialView())
|
|
200833
|
+
return contents;
|
|
200834
|
+
const boxRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Range2d.createXYXY(origin.x, origin.y, corner.x, corner.y);
|
|
200835
|
+
if (boxRange.isNull || boxRange.isAlmostZeroX || boxRange.isAlmostZeroY)
|
|
200836
|
+
return contents;
|
|
200837
|
+
const getClipPlane = (viewPt, viewDir, negate) => {
|
|
200838
|
+
const point = vp.viewToWorld(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Point3d.createFrom(viewPt));
|
|
200839
|
+
const boresite = _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.getBoresite(point, vp);
|
|
200840
|
+
const normal = viewDir.crossProduct(boresite.direction);
|
|
200841
|
+
if (negate)
|
|
200842
|
+
normal.negate(normal);
|
|
200843
|
+
return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ClipPlane.createNormalAndPoint(normal, point);
|
|
200844
|
+
};
|
|
200845
|
+
const planeSet = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ConvexClipPlaneSet.createEmpty();
|
|
200846
|
+
planeSet.addPlaneToConvexSet(getClipPlane(boxRange.low, vp.rotation.rowX(), true));
|
|
200847
|
+
planeSet.addPlaneToConvexSet(getClipPlane(boxRange.low, vp.rotation.rowY(), true));
|
|
200848
|
+
planeSet.addPlaneToConvexSet(getClipPlane(boxRange.high, vp.rotation.rowX(), false));
|
|
200849
|
+
planeSet.addPlaneToConvexSet(getClipPlane(boxRange.high, vp.rotation.rowY(), false));
|
|
200850
|
+
if (0 === planeSet.planes.length)
|
|
200851
|
+
return contents;
|
|
200852
|
+
const clip = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ClipVector.createCapture([_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ClipPrimitive.createCapture(planeSet)]);
|
|
200853
|
+
const viewRange = vp.computeViewRange();
|
|
200854
|
+
const range = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ClipUtilities.rangeOfClipperIntersectionWithRange(clip, viewRange);
|
|
200855
|
+
if (range.isNull)
|
|
200856
|
+
return contents;
|
|
200857
|
+
// TODO: Possible to make UnionOfComplexClipPlaneSets from view clip and planes work and remove 2nd containment check?
|
|
200858
|
+
const viewClip = (vp.viewFlags.clipVolume ? vp.view.getViewClip()?.clone() : undefined);
|
|
200859
|
+
if (viewClip) {
|
|
200860
|
+
const viewClipRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ClipUtilities.rangeOfClipperIntersectionWithRange(viewClip, viewRange);
|
|
200861
|
+
if (viewClipRange.isNull || !viewClipRange.intersectsRange(range))
|
|
200862
|
+
return contents;
|
|
200863
|
+
}
|
|
200864
|
+
const candidates = [];
|
|
200865
|
+
const categories = new Set();
|
|
200866
|
+
try {
|
|
200867
|
+
const viewedModels = [...vp.view.modelSelector.models].join(",");
|
|
200868
|
+
const viewedCategories = [...vp.view.categorySelector.categories].join(",");
|
|
200869
|
+
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}`;
|
|
200870
|
+
const reader = vp.iModel.createQueryReader(ecsql, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseECSqlPropertyNames });
|
|
200871
|
+
for await (const row of reader) {
|
|
200872
|
+
candidates.push(row.ECInstanceId);
|
|
200873
|
+
categories.add(row.category);
|
|
200874
|
+
}
|
|
200875
|
+
}
|
|
200876
|
+
catch { }
|
|
200877
|
+
if (0 === candidates.length)
|
|
200878
|
+
return contents;
|
|
200879
|
+
let offSubCategories;
|
|
200880
|
+
if (0 !== categories.size) {
|
|
200881
|
+
for (const categoryId of categories) {
|
|
200882
|
+
const subcategories = vp.iModel.subcategories.getSubCategories(categoryId);
|
|
200883
|
+
if (undefined === subcategories)
|
|
200884
|
+
continue;
|
|
200885
|
+
for (const subCategoryId of subcategories) {
|
|
200886
|
+
const appearance = vp.iModel.subcategories.getSubCategoryAppearance(subCategoryId);
|
|
200887
|
+
if (undefined === appearance || (!appearance.invisible && !appearance.dontLocate))
|
|
200888
|
+
continue;
|
|
200889
|
+
if (undefined === offSubCategories)
|
|
200890
|
+
offSubCategories = new Array;
|
|
200891
|
+
offSubCategories.push(subCategoryId);
|
|
200892
|
+
}
|
|
200893
|
+
}
|
|
200894
|
+
}
|
|
200895
|
+
const requestProps = {
|
|
200896
|
+
candidates,
|
|
200897
|
+
clip: clip.toJSON(),
|
|
200898
|
+
allowOverlaps,
|
|
200899
|
+
viewFlags: vp.viewFlags.toJSON(),
|
|
200900
|
+
offSubCategories,
|
|
200901
|
+
};
|
|
200902
|
+
const result = await vp.iModel.getGeometryContainment(requestProps);
|
|
200903
|
+
if (_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.SUCCESS !== result.status || undefined === result.candidatesContainment)
|
|
200904
|
+
return contents;
|
|
200905
|
+
result.candidatesContainment.forEach((status, index) => {
|
|
200906
|
+
if (_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ClipPlaneContainment.StronglyOutside !== status && (undefined === filter || filter(candidates[index])))
|
|
200907
|
+
contents.add(candidates[index]);
|
|
200908
|
+
});
|
|
200909
|
+
if (0 !== contents.size && viewClip) {
|
|
200910
|
+
requestProps.clip = viewClip.toJSON();
|
|
200911
|
+
requestProps.candidates.length = 0;
|
|
200912
|
+
for (const id of contents)
|
|
200913
|
+
requestProps.candidates.push(id);
|
|
200914
|
+
contents.clear();
|
|
200915
|
+
const resultViewClip = await vp.iModel.getGeometryContainment(requestProps);
|
|
200916
|
+
if (_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.SUCCESS !== resultViewClip.status || undefined === resultViewClip.candidatesContainment)
|
|
200917
|
+
return contents;
|
|
200918
|
+
resultViewClip.candidatesContainment.forEach((status, index) => {
|
|
200919
|
+
if (_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.ClipPlaneContainment.StronglyOutside !== status)
|
|
200920
|
+
contents.add(candidates[index]);
|
|
200921
|
+
});
|
|
200922
|
+
}
|
|
200923
|
+
return contents;
|
|
200924
|
+
}
|
|
200925
|
+
/** Get ids of visible elements to process from drag box or crossing line selection. */
|
|
200926
|
+
static getAreaSelectionCandidates(vp, origin, corner, method, allowOverlaps, filter) {
|
|
200831
200927
|
let contents = new Set();
|
|
200832
|
-
// TODO: Include option to use IModelConnection.getGeometryContainment instead of readPixels. No/Yes/2dOnly...
|
|
200833
200928
|
const pts = [];
|
|
200834
200929
|
pts[0] = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Point2d(Math.floor(origin.x + 0.5), Math.floor(origin.y + 0.5));
|
|
200835
200930
|
pts[1] = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Point2d(Math.floor(corner.x + 0.5), Math.floor(corner.y + 0.5));
|
|
@@ -200852,12 +200947,12 @@ class ElementSetTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Primiti
|
|
|
200852
200947
|
return undefined; // no geometry at this location...
|
|
200853
200948
|
if (!vp.isPixelSelectable(pixel))
|
|
200854
200949
|
return undefined; // reality model, terrain, etc - not selectable
|
|
200855
|
-
if (!
|
|
200950
|
+
if (undefined !== filter && !filter(pixel.elementId))
|
|
200856
200951
|
return undefined;
|
|
200857
200952
|
return pixel.elementId;
|
|
200858
200953
|
};
|
|
200859
200954
|
if (_SelectTool__WEBPACK_IMPORTED_MODULE_10__.SelectionMethod.Box === method) {
|
|
200860
|
-
const outline =
|
|
200955
|
+
const outline = allowOverlaps ? undefined : new Set();
|
|
200861
200956
|
const offset = sRange.clone();
|
|
200862
200957
|
offset.expandInPlace(-2);
|
|
200863
200958
|
for (testPoint.x = sRange.low.x; testPoint.x <= sRange.high.x; ++testPoint.x) {
|
|
@@ -200899,6 +200994,33 @@ class ElementSetTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Primiti
|
|
|
200899
200994
|
}, true);
|
|
200900
200995
|
return contents;
|
|
200901
200996
|
}
|
|
200997
|
+
/** Get ids of elements to process from drag box or crossing line selection using either the depth buffer or clip vector...
|
|
200998
|
+
* @internal
|
|
200999
|
+
*/
|
|
201000
|
+
static async getAreaOrVolumeSelectionCandidates(vp, origin, corner, method, allowOverlaps, filter, includeDecorationsForVolume) {
|
|
201001
|
+
let contents;
|
|
201002
|
+
if (_ToolSettings__WEBPACK_IMPORTED_MODULE_13__.ToolSettings.enableVolumeSelection && _SelectTool__WEBPACK_IMPORTED_MODULE_10__.SelectionMethod.Box === method && vp.view.isSpatialView()) {
|
|
201003
|
+
contents = await ElementSetTool.getVolumeSelectionCandidates(vp, origin, corner, allowOverlaps, filter);
|
|
201004
|
+
// Use area select to identify pickable transients...
|
|
201005
|
+
if (includeDecorationsForVolume) {
|
|
201006
|
+
const acceptTransientsFilter = (id) => { return _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.isTransient(id) && (undefined === filter || filter(id)); };
|
|
201007
|
+
const transients = ElementSetTool.getAreaSelectionCandidates(vp, origin, corner, method, allowOverlaps, acceptTransientsFilter);
|
|
201008
|
+
for (const id of transients)
|
|
201009
|
+
contents.add(id);
|
|
201010
|
+
}
|
|
201011
|
+
}
|
|
201012
|
+
else {
|
|
201013
|
+
contents = ElementSetTool.getAreaSelectionCandidates(vp, origin, corner, method, allowOverlaps, filter);
|
|
201014
|
+
}
|
|
201015
|
+
return contents;
|
|
201016
|
+
}
|
|
201017
|
+
/** Get element ids to process from drag box or crossing line selection.
|
|
201018
|
+
* Sub-classes may override to support selection scopes or apply tool specific filtering.
|
|
201019
|
+
*/
|
|
201020
|
+
async getDragSelectCandidates(vp, origin, corner, method, overlap) {
|
|
201021
|
+
const filter = (id) => { return this.isElementIdValid(id, ModifyElementSource.DragSelect); };
|
|
201022
|
+
return ElementSetTool.getAreaOrVolumeSelectionCandidates(vp, origin, corner, method, overlap, filter, _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.locateManager.options.allowDecorations);
|
|
201023
|
+
}
|
|
200902
201024
|
/** Populate [[ElementSetTool.agenda]] by drag box or crossing line information.
|
|
200903
201025
|
* @see [[ElementSetTool.getDragSelectCandidates]] to filter or augment the set of elements.
|
|
200904
201026
|
*/
|
|
@@ -203222,17 +203344,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
203222
203344
|
/* harmony export */ SelectionTool: () => (/* binding */ SelectionTool)
|
|
203223
203345
|
/* harmony export */ });
|
|
203224
203346
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
203225
|
-
/* harmony import */ var
|
|
203226
|
-
/* harmony import */ var
|
|
203227
|
-
/* harmony import */ var
|
|
203228
|
-
/* harmony import */ var
|
|
203229
|
-
/* harmony import */ var
|
|
203230
|
-
/* harmony import */ var
|
|
203231
|
-
/* harmony import */ var
|
|
203232
|
-
/* harmony import */ var
|
|
203233
|
-
/* harmony import */ var
|
|
203234
|
-
/* harmony import */ var _ToolAdmin__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ToolAdmin */ "../../core/frontend/lib/esm/tools/ToolAdmin.js");
|
|
203235
|
-
/* harmony import */ var _ToolAssistance__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./ToolAssistance */ "../../core/frontend/lib/esm/tools/ToolAssistance.js");
|
|
203347
|
+
/* harmony import */ var _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-common */ "../../core/common/lib/esm/core-common.js");
|
|
203348
|
+
/* harmony import */ var _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @itwin/appui-abstract */ "../../ui/appui-abstract/lib/esm/appui-abstract.js");
|
|
203349
|
+
/* harmony import */ var _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ElementLocateManager */ "../../core/frontend/lib/esm/ElementLocateManager.js");
|
|
203350
|
+
/* harmony import */ var _IModelApp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../IModelApp */ "../../core/frontend/lib/esm/IModelApp.js");
|
|
203351
|
+
/* harmony import */ var _PrimitiveTool__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./PrimitiveTool */ "../../core/frontend/lib/esm/tools/PrimitiveTool.js");
|
|
203352
|
+
/* harmony import */ var _Tool__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Tool */ "../../core/frontend/lib/esm/tools/Tool.js");
|
|
203353
|
+
/* harmony import */ var _ToolAdmin__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ToolAdmin */ "../../core/frontend/lib/esm/tools/ToolAdmin.js");
|
|
203354
|
+
/* harmony import */ var _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ToolAssistance */ "../../core/frontend/lib/esm/tools/ToolAssistance.js");
|
|
203355
|
+
/* harmony import */ var _ElementSetTool__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ElementSetTool */ "../../core/frontend/lib/esm/tools/ElementSetTool.js");
|
|
203236
203356
|
/*---------------------------------------------------------------------------------------------
|
|
203237
203357
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
203238
203358
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -203250,8 +203370,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
203250
203370
|
|
|
203251
203371
|
|
|
203252
203372
|
|
|
203253
|
-
|
|
203254
|
-
|
|
203255
203373
|
// cSpell:ignore buttongroup
|
|
203256
203374
|
/** The method for choosing elements with the [[SelectionTool]]
|
|
203257
203375
|
* @public
|
|
@@ -203297,7 +203415,7 @@ var SelectionProcessing;
|
|
|
203297
203415
|
/** Tool for picking a set of elements of interest, selected by the user.
|
|
203298
203416
|
* @public
|
|
203299
203417
|
*/
|
|
203300
|
-
class SelectionTool extends
|
|
203418
|
+
class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_5__.PrimitiveTool {
|
|
203301
203419
|
static hidden = false;
|
|
203302
203420
|
static toolId = "Select";
|
|
203303
203421
|
static iconSpec = "icon-cursor";
|
|
@@ -203316,7 +203434,7 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
203316
203434
|
set selectionMethod(method) { this._selectionMethodValue.value = method; }
|
|
203317
203435
|
get selectionMode() { return this._selectionModeValue.value; }
|
|
203318
203436
|
set selectionMode(mode) { this._selectionModeValue.value = mode; }
|
|
203319
|
-
static methodsMessage(str) { return
|
|
203437
|
+
static methodsMessage(str) { return _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate(`ElementSet.SelectionMethods.${str}`); }
|
|
203320
203438
|
static _methodsName = "selectionMethods";
|
|
203321
203439
|
/* The property descriptions used to generate ToolSettings UI. */
|
|
203322
203440
|
static _getMethodsDescription() {
|
|
@@ -203327,14 +203445,14 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
203327
203445
|
editor: {
|
|
203328
203446
|
name: "enum-buttongroup",
|
|
203329
203447
|
params: [{
|
|
203330
|
-
type:
|
|
203448
|
+
type: _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_2__.PropertyEditorParamTypes.ButtonGroupData,
|
|
203331
203449
|
buttons: [
|
|
203332
203450
|
{ iconSpec: "icon-select-single" },
|
|
203333
203451
|
{ iconSpec: "icon-select-line" },
|
|
203334
203452
|
{ iconSpec: "icon-select-box" },
|
|
203335
203453
|
],
|
|
203336
203454
|
}, {
|
|
203337
|
-
type:
|
|
203455
|
+
type: _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_2__.PropertyEditorParamTypes.SuppressEditorLabel,
|
|
203338
203456
|
suppressLabelPlaceholder: true,
|
|
203339
203457
|
},
|
|
203340
203458
|
],
|
|
@@ -203348,7 +203466,7 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
203348
203466
|
},
|
|
203349
203467
|
};
|
|
203350
203468
|
}
|
|
203351
|
-
static modesMessage(str) { return
|
|
203469
|
+
static modesMessage(str) { return _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate(`ElementSet.SelectionModes.${str}`); }
|
|
203352
203470
|
static _modesName = "selectionModes";
|
|
203353
203471
|
/* The property descriptions used to generate ToolSettings UI. */
|
|
203354
203472
|
static _getModesDescription() {
|
|
@@ -203359,20 +203477,20 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
203359
203477
|
editor: {
|
|
203360
203478
|
name: "enum-buttongroup",
|
|
203361
203479
|
params: [{
|
|
203362
|
-
type:
|
|
203480
|
+
type: _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_2__.PropertyEditorParamTypes.ButtonGroupData,
|
|
203363
203481
|
buttons: [
|
|
203364
203482
|
{ iconSpec: "icon-replace" },
|
|
203365
203483
|
{ iconSpec: "icon-select-plus" },
|
|
203366
203484
|
{
|
|
203367
203485
|
iconSpec: "icon-select-minus",
|
|
203368
203486
|
isEnabledFunction: () => {
|
|
203369
|
-
const tool =
|
|
203370
|
-
return tool instanceof
|
|
203487
|
+
const tool = _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.activeTool;
|
|
203488
|
+
return tool instanceof _PrimitiveTool__WEBPACK_IMPORTED_MODULE_5__.PrimitiveTool ? tool.iModel.selectionSet.isActive : false;
|
|
203371
203489
|
},
|
|
203372
203490
|
},
|
|
203373
203491
|
],
|
|
203374
203492
|
}, {
|
|
203375
|
-
type:
|
|
203493
|
+
type: _itwin_appui_abstract__WEBPACK_IMPORTED_MODULE_2__.PropertyEditorParamTypes.SuppressEditorLabel,
|
|
203376
203494
|
suppressLabelPlaceholder: true,
|
|
203377
203495
|
},
|
|
203378
203496
|
],
|
|
@@ -203399,49 +203517,49 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
203399
203517
|
mainMsg += (0 === this._points.length ? "StartCorner" : "OppositeCorner");
|
|
203400
203518
|
break;
|
|
203401
203519
|
}
|
|
203402
|
-
const mainInstruction =
|
|
203520
|
+
const mainInstruction = _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstruction(this.iconSpec, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate(mainMsg));
|
|
203403
203521
|
const sections = [];
|
|
203404
203522
|
switch (method) {
|
|
203405
203523
|
case SelectionMethod.Pick:
|
|
203406
203524
|
const mousePickInstructions = [];
|
|
203407
|
-
mousePickInstructions.push(
|
|
203408
|
-
mousePickInstructions.push(
|
|
203409
|
-
mousePickInstructions.push(
|
|
203410
|
-
mousePickInstructions.push(
|
|
203525
|
+
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));
|
|
203526
|
+
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));
|
|
203527
|
+
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));
|
|
203528
|
+
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));
|
|
203411
203529
|
if (SelectionMode.Replace === mode) {
|
|
203412
|
-
mousePickInstructions.push(
|
|
203413
|
-
mousePickInstructions.push(
|
|
203530
|
+
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));
|
|
203531
|
+
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));
|
|
203414
203532
|
}
|
|
203415
|
-
sections.push(
|
|
203533
|
+
sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createSection(mousePickInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.inputsLabel));
|
|
203416
203534
|
const touchPickInstructions = [];
|
|
203417
|
-
if (!
|
|
203418
|
-
touchPickInstructions.push(
|
|
203419
|
-
sections.push(
|
|
203535
|
+
if (!_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createTouchCursorInstructions(touchPickInstructions))
|
|
203536
|
+
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));
|
|
203537
|
+
sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createSection(touchPickInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.inputsLabel));
|
|
203420
203538
|
break;
|
|
203421
203539
|
case SelectionMethod.Line:
|
|
203422
203540
|
const mouseLineInstructions = [];
|
|
203423
|
-
mouseLineInstructions.push(
|
|
203541
|
+
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));
|
|
203424
203542
|
if (SelectionMode.Replace === mode)
|
|
203425
|
-
mouseLineInstructions.push(
|
|
203426
|
-
sections.push(
|
|
203543
|
+
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));
|
|
203544
|
+
sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createSection(mouseLineInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.inputsLabel));
|
|
203427
203545
|
const touchLineInstructions = [];
|
|
203428
|
-
touchLineInstructions.push(
|
|
203429
|
-
sections.push(
|
|
203546
|
+
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));
|
|
203547
|
+
sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createSection(touchLineInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.inputsLabel));
|
|
203430
203548
|
break;
|
|
203431
203549
|
case SelectionMethod.Box:
|
|
203432
203550
|
const mouseBoxInstructions = [];
|
|
203433
|
-
mouseBoxInstructions.push(
|
|
203434
|
-
mouseBoxInstructions.push(
|
|
203551
|
+
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));
|
|
203552
|
+
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));
|
|
203435
203553
|
if (SelectionMode.Replace === mode)
|
|
203436
|
-
mouseBoxInstructions.push(
|
|
203437
|
-
sections.push(
|
|
203554
|
+
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));
|
|
203555
|
+
sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createSection(mouseBoxInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.inputsLabel));
|
|
203438
203556
|
const touchBoxInstructions = [];
|
|
203439
|
-
touchBoxInstructions.push(
|
|
203440
|
-
sections.push(
|
|
203557
|
+
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));
|
|
203558
|
+
sections.push(_ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createSection(touchBoxInstructions, _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.inputsLabel));
|
|
203441
203559
|
break;
|
|
203442
203560
|
}
|
|
203443
|
-
const instructions =
|
|
203444
|
-
|
|
203561
|
+
const instructions = _ToolAssistance__WEBPACK_IMPORTED_MODULE_8__.ToolAssistance.createInstructions(mainInstruction, sections);
|
|
203562
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.notifications.setToolAssistance(instructions);
|
|
203445
203563
|
}
|
|
203446
203564
|
initSelectTool() {
|
|
203447
203565
|
const method = this.selectionMethod;
|
|
@@ -203449,8 +203567,8 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
203449
203567
|
const enableLocate = SelectionMethod.Pick === method;
|
|
203450
203568
|
this._isSelectByPoints = false;
|
|
203451
203569
|
this._points.length = 0;
|
|
203452
|
-
this.initLocateElements(enableLocate, false, enableLocate ? "default" :
|
|
203453
|
-
|
|
203570
|
+
this.initLocateElements(enableLocate, false, enableLocate ? "default" : _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.viewManager.crossHairCursor, _Tool__WEBPACK_IMPORTED_MODULE_6__.CoordinateLockOverrides.All);
|
|
203571
|
+
_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...
|
|
203454
203572
|
this.showPrompt(mode, method);
|
|
203455
203573
|
}
|
|
203456
203574
|
processMiss(_ev) {
|
|
@@ -203495,13 +203613,13 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
203495
203613
|
selectByPointsDecorate(context) {
|
|
203496
203614
|
if (!this._isSelectByPoints)
|
|
203497
203615
|
return;
|
|
203498
|
-
const ev = new
|
|
203499
|
-
|
|
203616
|
+
const ev = new _Tool__WEBPACK_IMPORTED_MODULE_6__.BeButtonEvent();
|
|
203617
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.fillEventFromCursorLocation(ev);
|
|
203500
203618
|
if (undefined === ev.viewport)
|
|
203501
203619
|
return;
|
|
203502
203620
|
const vp = context.viewport;
|
|
203503
|
-
const bestContrastIsBlack = (
|
|
203504
|
-
const crossingLine = (SelectionMethod.Line === this.selectionMethod || (SelectionMethod.Pick === this.selectionMethod &&
|
|
203621
|
+
const bestContrastIsBlack = (_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ColorDef.black === vp.getContrastToBackgroundColor());
|
|
203622
|
+
const crossingLine = (SelectionMethod.Line === this.selectionMethod || (SelectionMethod.Pick === this.selectionMethod && _Tool__WEBPACK_IMPORTED_MODULE_6__.BeButton.Reset === ev.button));
|
|
203505
203623
|
const overlapSelection = (crossingLine || this.useOverlapSelection(ev));
|
|
203506
203624
|
const position = vp.worldToView(this._points[0]);
|
|
203507
203625
|
position.x = Math.floor(position.x) + 0.5;
|
|
@@ -203529,111 +203647,42 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
203529
203647
|
};
|
|
203530
203648
|
context.addCanvasDecoration({ position, drawDecoration });
|
|
203531
203649
|
}
|
|
203532
|
-
selectByPointsProcess(origin, corner, ev, method, overlap) {
|
|
203650
|
+
async selectByPointsProcess(origin, corner, ev, method, overlap) {
|
|
203533
203651
|
const vp = ev.viewport;
|
|
203534
203652
|
if (!vp)
|
|
203535
|
-
return;
|
|
203536
|
-
const
|
|
203537
|
-
|
|
203538
|
-
|
|
203539
|
-
|
|
203540
|
-
|
|
203541
|
-
|
|
203542
|
-
const allowTransients = this.wantPickableDecorations();
|
|
203543
|
-
vp.readPixels(rect, _render_Pixel__WEBPACK_IMPORTED_MODULE_6__.Pixel.Selector.Feature, (pixels) => {
|
|
203544
|
-
if (undefined === pixels)
|
|
203545
|
-
return;
|
|
203546
|
-
const sRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range2d.createNull();
|
|
203547
|
-
sRange.extendPoint(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.create(vp.cssPixelsToDevicePixels(range.low.x), vp.cssPixelsToDevicePixels(range.low.y)));
|
|
203548
|
-
sRange.extendPoint(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.create(vp.cssPixelsToDevicePixels(range.high.x), vp.cssPixelsToDevicePixels(range.high.y)));
|
|
203549
|
-
pts[0].x = vp.cssPixelsToDevicePixels(pts[0].x);
|
|
203550
|
-
pts[0].y = vp.cssPixelsToDevicePixels(pts[0].y);
|
|
203551
|
-
pts[1].x = vp.cssPixelsToDevicePixels(pts[1].x);
|
|
203552
|
-
pts[1].y = vp.cssPixelsToDevicePixels(pts[1].y);
|
|
203553
|
-
let contents = new Set();
|
|
203554
|
-
const testPoint = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.createZero();
|
|
203555
|
-
const getPixelElementId = (pixel) => {
|
|
203556
|
-
if (undefined === pixel.elementId || _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.isInvalid(pixel.elementId))
|
|
203557
|
-
return undefined; // no geometry at this location...
|
|
203558
|
-
if (!allowTransients && _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.isTransient(pixel.elementId))
|
|
203559
|
-
return undefined; // tool didn't request pickable decorations...
|
|
203560
|
-
if (!vp.isPixelSelectable(pixel))
|
|
203561
|
-
return undefined; // reality model, terrain, etc - not selectable
|
|
203562
|
-
return pixel.elementId;
|
|
203563
|
-
};
|
|
203564
|
-
if (SelectionMethod.Box === method) {
|
|
203565
|
-
const outline = overlap ? undefined : new Set();
|
|
203566
|
-
const offset = sRange.clone();
|
|
203567
|
-
offset.expandInPlace(-2);
|
|
203568
|
-
for (testPoint.x = sRange.low.x; testPoint.x <= sRange.high.x; ++testPoint.x) {
|
|
203569
|
-
for (testPoint.y = sRange.low.y; testPoint.y <= sRange.high.y; ++testPoint.y) {
|
|
203570
|
-
const pixel = pixels.getPixel(testPoint.x, testPoint.y);
|
|
203571
|
-
const elementId = getPixelElementId(pixel);
|
|
203572
|
-
if (undefined === elementId)
|
|
203573
|
-
continue;
|
|
203574
|
-
if (undefined !== outline && !offset.containsPoint(testPoint))
|
|
203575
|
-
outline.add(elementId.toString());
|
|
203576
|
-
else
|
|
203577
|
-
contents.add(elementId.toString());
|
|
203578
|
-
}
|
|
203579
|
-
}
|
|
203580
|
-
if (undefined !== outline && 0 !== outline.size) {
|
|
203581
|
-
const inside = new Set();
|
|
203582
|
-
contents.forEach((id) => {
|
|
203583
|
-
if (!outline.has(id))
|
|
203584
|
-
inside.add(id);
|
|
203585
|
-
});
|
|
203586
|
-
contents = inside;
|
|
203587
|
-
}
|
|
203588
|
-
}
|
|
203589
|
-
else {
|
|
203590
|
-
const closePoint = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.createZero();
|
|
203591
|
-
for (testPoint.x = sRange.low.x; testPoint.x <= sRange.high.x; ++testPoint.x) {
|
|
203592
|
-
for (testPoint.y = sRange.low.y; testPoint.y <= sRange.high.y; ++testPoint.y) {
|
|
203593
|
-
const pixel = pixels.getPixel(testPoint.x, testPoint.y);
|
|
203594
|
-
const elementId = getPixelElementId(pixel);
|
|
203595
|
-
if (undefined === elementId)
|
|
203596
|
-
continue;
|
|
203597
|
-
const fraction = testPoint.fractionOfProjectionToLine(pts[0], pts[1], 0.0);
|
|
203598
|
-
pts[0].interpolate(fraction, pts[1], closePoint);
|
|
203599
|
-
if (closePoint.distance(testPoint) < 1.5)
|
|
203600
|
-
contents.add(elementId.toString());
|
|
203601
|
-
}
|
|
203602
|
-
}
|
|
203603
|
-
}
|
|
203604
|
-
if (0 === contents.size) {
|
|
203605
|
-
if (!ev.isControlKey && this.wantSelectionClearOnMiss(ev) && this.processMiss(ev))
|
|
203606
|
-
this.syncSelectionMode();
|
|
203607
|
-
return;
|
|
203608
|
-
}
|
|
203609
|
-
switch (this.selectionMode) {
|
|
203610
|
-
case SelectionMode.Replace:
|
|
203611
|
-
if (!ev.isControlKey)
|
|
203612
|
-
this.processSelection(contents, SelectionProcessing.ReplaceSelectionWithElement); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
203613
|
-
else
|
|
203614
|
-
this.processSelection(contents, SelectionProcessing.InvertElementInSelection); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
203615
|
-
break;
|
|
203616
|
-
case SelectionMode.Add:
|
|
203617
|
-
this.processSelection(contents, SelectionProcessing.AddElementToSelection); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
203618
|
-
break;
|
|
203619
|
-
case SelectionMode.Remove:
|
|
203620
|
-
this.processSelection(contents, SelectionProcessing.RemoveElementFromSelection); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
203621
|
-
break;
|
|
203653
|
+
return false;
|
|
203654
|
+
const filter = (id) => { return !_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.isTransient(id); };
|
|
203655
|
+
const contents = await _ElementSetTool__WEBPACK_IMPORTED_MODULE_9__.ElementSetTool.getAreaOrVolumeSelectionCandidates(vp, origin, corner, method, overlap, this.wantPickableDecorations() ? undefined : filter, this.wantPickableDecorations());
|
|
203656
|
+
if (0 === contents.size) {
|
|
203657
|
+
if (!ev.isControlKey && this.wantSelectionClearOnMiss(ev) && this.processMiss(ev)) {
|
|
203658
|
+
this.syncSelectionMode();
|
|
203659
|
+
return true;
|
|
203622
203660
|
}
|
|
203623
|
-
|
|
203661
|
+
return false;
|
|
203662
|
+
}
|
|
203663
|
+
switch (this.selectionMode) {
|
|
203664
|
+
case SelectionMode.Replace:
|
|
203665
|
+
if (!ev.isControlKey)
|
|
203666
|
+
return this.processSelection(contents, SelectionProcessing.ReplaceSelectionWithElement);
|
|
203667
|
+
return this.processSelection(contents, SelectionProcessing.InvertElementInSelection);
|
|
203668
|
+
case SelectionMode.Add:
|
|
203669
|
+
return this.processSelection(contents, SelectionProcessing.AddElementToSelection);
|
|
203670
|
+
case SelectionMode.Remove:
|
|
203671
|
+
return this.processSelection(contents, SelectionProcessing.RemoveElementFromSelection);
|
|
203672
|
+
}
|
|
203624
203673
|
}
|
|
203625
203674
|
selectByPointsStart(ev) {
|
|
203626
|
-
if (
|
|
203675
|
+
if (_Tool__WEBPACK_IMPORTED_MODULE_6__.BeButton.Data !== ev.button && _Tool__WEBPACK_IMPORTED_MODULE_6__.BeButton.Reset !== ev.button)
|
|
203627
203676
|
return false;
|
|
203628
203677
|
this._points.length = 0;
|
|
203629
203678
|
this._points.push(ev.point.clone());
|
|
203630
203679
|
this._isSelectByPoints = true;
|
|
203631
|
-
|
|
203632
|
-
|
|
203680
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.accuSnap.enableLocate(false);
|
|
203681
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.setLocateCircleOn(false);
|
|
203633
203682
|
this.showPrompt(this.selectionMode, this.selectionMethod);
|
|
203634
203683
|
return true;
|
|
203635
203684
|
}
|
|
203636
|
-
selectByPointsEnd(ev) {
|
|
203685
|
+
async selectByPointsEnd(ev) {
|
|
203637
203686
|
if (!this._isSelectByPoints)
|
|
203638
203687
|
return false;
|
|
203639
203688
|
const vp = ev.viewport;
|
|
@@ -203643,10 +203692,10 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
203643
203692
|
}
|
|
203644
203693
|
const origin = vp.worldToView(this._points[0]);
|
|
203645
203694
|
const corner = vp.worldToView(ev.point);
|
|
203646
|
-
if (SelectionMethod.Line === this.selectionMethod || (SelectionMethod.Pick === this.selectionMethod &&
|
|
203647
|
-
this.selectByPointsProcess(origin, corner, ev, SelectionMethod.Line, true);
|
|
203695
|
+
if (SelectionMethod.Line === this.selectionMethod || (SelectionMethod.Pick === this.selectionMethod && _Tool__WEBPACK_IMPORTED_MODULE_6__.BeButton.Reset === ev.button))
|
|
203696
|
+
await this.selectByPointsProcess(origin, corner, ev, SelectionMethod.Line, true);
|
|
203648
203697
|
else
|
|
203649
|
-
this.selectByPointsProcess(origin, corner, ev, SelectionMethod.Box, this.useOverlapSelection(ev));
|
|
203698
|
+
await this.selectByPointsProcess(origin, corner, ev, SelectionMethod.Box, this.useOverlapSelection(ev));
|
|
203650
203699
|
this.initSelectTool();
|
|
203651
203700
|
vp.invalidateDecorations();
|
|
203652
203701
|
return true;
|
|
@@ -203657,14 +203706,14 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
203657
203706
|
}
|
|
203658
203707
|
async selectDecoration(ev, currHit) {
|
|
203659
203708
|
if (undefined === currHit)
|
|
203660
|
-
currHit = await
|
|
203709
|
+
currHit = await _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.locateManager.doLocate(new _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateResponse(), true, ev.point, ev.viewport, ev.inputSource);
|
|
203661
203710
|
if (undefined !== currHit)
|
|
203662
|
-
return (currHit.isElementHit ?
|
|
203663
|
-
return
|
|
203711
|
+
return (currHit.isElementHit ? _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.viewManager.overrideElementButtonEvent(currHit, ev) : _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.viewManager.onDecorationButtonEvent(currHit, ev));
|
|
203712
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No;
|
|
203664
203713
|
}
|
|
203665
203714
|
async processHit(ev, hit) {
|
|
203666
203715
|
if (hit.isModelHit || hit.isMapHit)
|
|
203667
|
-
return
|
|
203716
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No; // model hit = terrain, reality models, background maps, etc - not selectable
|
|
203668
203717
|
switch (this.selectionMode) {
|
|
203669
203718
|
case SelectionMode.Replace:
|
|
203670
203719
|
await this.processSelection(hit.sourceId, ev.isControlKey ? SelectionProcessing.InvertElementInSelection : SelectionProcessing.ReplaceSelectionWithElement);
|
|
@@ -203676,59 +203725,59 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
203676
203725
|
await this.processSelection(hit.sourceId, SelectionProcessing.RemoveElementFromSelection);
|
|
203677
203726
|
break;
|
|
203678
203727
|
}
|
|
203679
|
-
return
|
|
203728
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
|
|
203680
203729
|
}
|
|
203681
203730
|
async onMouseStartDrag(ev) {
|
|
203682
|
-
|
|
203683
|
-
if (
|
|
203684
|
-
return
|
|
203685
|
-
if (
|
|
203686
|
-
return
|
|
203687
|
-
return this.selectByPointsStart(ev) ?
|
|
203731
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.accuSnap.clear(); // Need to test hit at start drag location, not current AccuSnap...
|
|
203732
|
+
if (_Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes === await this.selectDecoration(ev))
|
|
203733
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
|
|
203734
|
+
if (_Tool__WEBPACK_IMPORTED_MODULE_6__.InputSource.Touch === ev.inputSource && SelectionMethod.Pick === this.selectionMethod)
|
|
203735
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No; // Require method change for line/box selection...allow IdleTool to handle touch move...
|
|
203736
|
+
return this.selectByPointsStart(ev) ? _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes : _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No;
|
|
203688
203737
|
}
|
|
203689
203738
|
async onMouseEndDrag(ev) {
|
|
203690
|
-
return this.selectByPointsEnd(ev) ?
|
|
203739
|
+
return await this.selectByPointsEnd(ev) ? _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes : _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No;
|
|
203691
203740
|
}
|
|
203692
203741
|
async onDataButtonUp(ev) {
|
|
203693
203742
|
if (undefined === ev.viewport)
|
|
203694
|
-
return
|
|
203695
|
-
if (this.selectByPointsEnd(ev))
|
|
203696
|
-
return
|
|
203743
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No;
|
|
203744
|
+
if (await this.selectByPointsEnd(ev))
|
|
203745
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
|
|
203697
203746
|
if (SelectionMethod.Pick !== this.selectionMethod) {
|
|
203698
203747
|
if (!ev.isControlKey && this.wantSelectionClearOnMiss(ev) && this.processMiss(ev))
|
|
203699
203748
|
this.syncSelectionMode();
|
|
203700
|
-
if (
|
|
203749
|
+
if (_Tool__WEBPACK_IMPORTED_MODULE_6__.InputSource.Touch !== ev.inputSource)
|
|
203701
203750
|
this.selectByPointsStart(ev); // Require touch move and not tap to start crossing line/box selection...
|
|
203702
|
-
return
|
|
203751
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
|
|
203703
203752
|
}
|
|
203704
|
-
const hit = await
|
|
203753
|
+
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);
|
|
203705
203754
|
if (hit !== undefined) {
|
|
203706
|
-
if (
|
|
203707
|
-
return
|
|
203708
|
-
if (
|
|
203709
|
-
return
|
|
203755
|
+
if (_Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes === await this.selectDecoration(ev, hit))
|
|
203756
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
|
|
203757
|
+
if (_Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes === await this.processHit(ev, hit))
|
|
203758
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
|
|
203710
203759
|
}
|
|
203711
203760
|
if (!ev.isControlKey && this.wantSelectionClearOnMiss(ev) && this.processMiss(ev))
|
|
203712
203761
|
this.syncSelectionMode();
|
|
203713
|
-
return
|
|
203762
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
|
|
203714
203763
|
}
|
|
203715
203764
|
async onResetButtonUp(ev) {
|
|
203716
203765
|
if (this._isSelectByPoints) {
|
|
203717
203766
|
if (undefined !== ev.viewport)
|
|
203718
203767
|
ev.viewport.invalidateDecorations();
|
|
203719
203768
|
this.initSelectTool();
|
|
203720
|
-
return
|
|
203769
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
|
|
203721
203770
|
}
|
|
203722
203771
|
// Check for overlapping hits...
|
|
203723
|
-
const lastHit = SelectionMode.Remove === this.selectionMode ? undefined :
|
|
203772
|
+
const lastHit = SelectionMode.Remove === this.selectionMode ? undefined : _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.locateManager.currHit;
|
|
203724
203773
|
if (lastHit && this.iModel.selectionSet.elements.has(lastHit.sourceId)) {
|
|
203725
|
-
const autoHit =
|
|
203774
|
+
const autoHit = _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.accuSnap.currHit;
|
|
203726
203775
|
// Play nice w/auto-locate, only remove previous hit if not currently auto-locating or over previous hit
|
|
203727
203776
|
if (undefined === autoHit || autoHit.isSameHit(lastHit)) {
|
|
203728
|
-
const response = new
|
|
203777
|
+
const response = new _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateResponse();
|
|
203729
203778
|
let nextHit;
|
|
203730
203779
|
do {
|
|
203731
|
-
nextHit = await
|
|
203780
|
+
nextHit = await _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.locateManager.doLocate(response, false, ev.point, ev.viewport, ev.inputSource);
|
|
203732
203781
|
} while (undefined !== nextHit && (nextHit.isModelHit || nextHit.isMapHit)); // Ignore reality models, terrain, maps, etc.
|
|
203733
203782
|
// remove element(s) previously selected if in replace mode, or if we have a next element in add mode
|
|
203734
203783
|
if (SelectionMode.Replace === this.selectionMode || undefined !== nextHit)
|
|
@@ -203736,69 +203785,69 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
203736
203785
|
// add element(s) located via reset button
|
|
203737
203786
|
if (undefined !== nextHit)
|
|
203738
203787
|
await this.processSelection(nextHit.sourceId, SelectionProcessing.AddElementToSelection);
|
|
203739
|
-
return
|
|
203788
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
|
|
203740
203789
|
}
|
|
203741
203790
|
}
|
|
203742
|
-
if (
|
|
203743
|
-
return
|
|
203744
|
-
await
|
|
203745
|
-
return
|
|
203791
|
+
if (_Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes === await this.selectDecoration(ev, _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.accuSnap.currHit))
|
|
203792
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
|
|
203793
|
+
await _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.accuSnap.resetButton();
|
|
203794
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes;
|
|
203746
203795
|
}
|
|
203747
203796
|
async onSuspend() {
|
|
203748
203797
|
this._isSuspended = true;
|
|
203749
203798
|
if (this.wantEditManipulators())
|
|
203750
|
-
|
|
203799
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.manipulatorToolEvent.raiseEvent(this, _ToolAdmin__WEBPACK_IMPORTED_MODULE_7__.ManipulatorToolEvent.Suspend);
|
|
203751
203800
|
}
|
|
203752
203801
|
async onUnsuspend() {
|
|
203753
203802
|
this._isSuspended = false;
|
|
203754
203803
|
if (this.wantEditManipulators())
|
|
203755
|
-
|
|
203804
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.manipulatorToolEvent.raiseEvent(this, _ToolAdmin__WEBPACK_IMPORTED_MODULE_7__.ManipulatorToolEvent.Unsuspend);
|
|
203756
203805
|
this.showPrompt(this.selectionMode, this.selectionMethod);
|
|
203757
203806
|
}
|
|
203758
203807
|
async onTouchMoveStart(ev, startEv) {
|
|
203759
203808
|
if (startEv.isSingleTouch && !this._isSelectByPoints)
|
|
203760
|
-
await
|
|
203761
|
-
return (this._isSuspended || this._isSelectByPoints) ?
|
|
203809
|
+
await _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.convertTouchMoveStartToButtonDownAndMotion(startEv, ev);
|
|
203810
|
+
return (this._isSuspended || this._isSelectByPoints) ? _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.Yes : _Tool__WEBPACK_IMPORTED_MODULE_6__.EventHandled.No;
|
|
203762
203811
|
}
|
|
203763
203812
|
async onTouchMove(ev) {
|
|
203764
203813
|
if (this._isSelectByPoints)
|
|
203765
|
-
return
|
|
203814
|
+
return _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.convertTouchMoveToMotion(ev);
|
|
203766
203815
|
}
|
|
203767
203816
|
async onTouchComplete(ev) {
|
|
203768
203817
|
if (this._isSelectByPoints)
|
|
203769
|
-
return
|
|
203818
|
+
return _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.convertTouchEndToButtonUp(ev);
|
|
203770
203819
|
}
|
|
203771
203820
|
async onTouchCancel(ev) {
|
|
203772
203821
|
if (this._isSelectByPoints)
|
|
203773
|
-
return
|
|
203822
|
+
return _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.convertTouchEndToButtonUp(ev, _Tool__WEBPACK_IMPORTED_MODULE_6__.BeButton.Reset);
|
|
203774
203823
|
}
|
|
203775
203824
|
decorate(context) { this.selectByPointsDecorate(context); }
|
|
203776
203825
|
async onModifierKeyTransition(_wentDown, modifier, _event) {
|
|
203777
|
-
return (modifier ===
|
|
203826
|
+
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;
|
|
203778
203827
|
}
|
|
203779
203828
|
async filterHit(hit, out) {
|
|
203780
203829
|
if (!this.wantPickableDecorations() && !hit.isElementHit)
|
|
203781
|
-
return
|
|
203830
|
+
return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateFilterStatus.Reject;
|
|
203782
203831
|
const mode = this.selectionMode;
|
|
203783
203832
|
if (SelectionMode.Replace === mode)
|
|
203784
|
-
return
|
|
203833
|
+
return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateFilterStatus.Accept;
|
|
203785
203834
|
const isSelected = this.iModel.selectionSet.elements.has(hit.sourceId);
|
|
203786
|
-
const status = ((SelectionMode.Add === mode ? !isSelected : isSelected) ?
|
|
203787
|
-
if (out &&
|
|
203788
|
-
out.explanation =
|
|
203835
|
+
const status = ((SelectionMode.Add === mode ? !isSelected : isSelected) ? _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateFilterStatus.Accept : _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateFilterStatus.Reject);
|
|
203836
|
+
if (out && _ElementLocateManager__WEBPACK_IMPORTED_MODULE_3__.LocateFilterStatus.Reject === status)
|
|
203837
|
+
out.explanation = _Tool__WEBPACK_IMPORTED_MODULE_6__.CoreTools.translate(`ElementSet.Error.${isSelected ? "AlreadySelected" : "NotSelected"}`);
|
|
203789
203838
|
return status;
|
|
203790
203839
|
}
|
|
203791
203840
|
async onRestartTool() { return this.exitTool(); }
|
|
203792
203841
|
async onCleanup() {
|
|
203793
203842
|
if (this.wantEditManipulators())
|
|
203794
|
-
|
|
203843
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.manipulatorToolEvent.raiseEvent(this, _ToolAdmin__WEBPACK_IMPORTED_MODULE_7__.ManipulatorToolEvent.Stop);
|
|
203795
203844
|
}
|
|
203796
203845
|
async onPostInstall() {
|
|
203797
203846
|
await super.onPostInstall();
|
|
203798
203847
|
if (!this.targetView)
|
|
203799
203848
|
return;
|
|
203800
203849
|
if (this.wantEditManipulators())
|
|
203801
|
-
|
|
203850
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.manipulatorToolEvent.raiseEvent(this, _ToolAdmin__WEBPACK_IMPORTED_MODULE_7__.ManipulatorToolEvent.Start);
|
|
203802
203851
|
this.initSelectTool();
|
|
203803
203852
|
}
|
|
203804
203853
|
static async startTool() { return new SelectionTool().run(); }
|
|
@@ -203810,7 +203859,7 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
203810
203859
|
}
|
|
203811
203860
|
if (this.wantToolSettings()) {
|
|
203812
203861
|
const syncMode = { value: this._selectionModeValue, propertyName: SelectionTool._modesName };
|
|
203813
|
-
|
|
203862
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.toolSettingsState.saveToolSettingProperty(this.toolId, syncMode);
|
|
203814
203863
|
this.syncToolSettingsProperties([syncMode]);
|
|
203815
203864
|
}
|
|
203816
203865
|
}
|
|
@@ -203821,14 +203870,14 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
203821
203870
|
if (!this.wantToolSettings())
|
|
203822
203871
|
return undefined;
|
|
203823
203872
|
// load latest values from session
|
|
203824
|
-
|
|
203873
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.toolSettingsState.getInitialToolSettingValues(this.toolId, [SelectionTool._modesName])?.forEach((value) => {
|
|
203825
203874
|
if (value.propertyName === SelectionTool._modesName)
|
|
203826
203875
|
this._selectionModeValue = value.value;
|
|
203827
203876
|
});
|
|
203828
203877
|
// Make sure a mode of SelectionMode.Remove is valid
|
|
203829
203878
|
if (SelectionMode.Remove === this.selectionMode && !this.iModel.selectionSet.isActive) {
|
|
203830
203879
|
this.selectionMode = SelectionMode.Replace;
|
|
203831
|
-
|
|
203880
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.toolSettingsState.saveToolSettingProperty(this.toolId, { propertyName: SelectionTool._modesName, value: this._selectionModeValue });
|
|
203832
203881
|
}
|
|
203833
203882
|
const toolSettings = new Array();
|
|
203834
203883
|
// generate 3 columns - label will be placed in column 0 and button group editors in columns 1 and 2.
|
|
@@ -203847,7 +203896,7 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
203847
203896
|
if (this._selectionMethodValue) {
|
|
203848
203897
|
const currWantManipulators = this.wantEditManipulators();
|
|
203849
203898
|
if (saveWantManipulators !== currWantManipulators)
|
|
203850
|
-
|
|
203899
|
+
_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);
|
|
203851
203900
|
changed = true;
|
|
203852
203901
|
}
|
|
203853
203902
|
}
|
|
@@ -203855,7 +203904,7 @@ class SelectionTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitiv
|
|
|
203855
203904
|
this._selectionModeValue = updatedValue.value;
|
|
203856
203905
|
if (this._selectionModeValue) {
|
|
203857
203906
|
if (this.wantToolSettings())
|
|
203858
|
-
|
|
203907
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.toolAdmin.toolSettingsState.saveToolSettingProperty(this.toolId, { propertyName: SelectionTool._modesName, value: this._selectionModeValue });
|
|
203859
203908
|
changed = true;
|
|
203860
203909
|
}
|
|
203861
203910
|
}
|
|
@@ -206998,6 +207047,11 @@ class ToolSettings {
|
|
|
206998
207047
|
};
|
|
206999
207048
|
/** Maximum number of times in a second the accuSnap tool's onMotion function is called. */
|
|
207000
207049
|
static maxOnMotionSnapCallPerSecond = 15;
|
|
207050
|
+
/** 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.
|
|
207051
|
+
* @note Enabling is not recommended for web applications.
|
|
207052
|
+
* @beta
|
|
207053
|
+
*/
|
|
207054
|
+
static enableVolumeSelection = false;
|
|
207001
207055
|
}
|
|
207002
207056
|
|
|
207003
207057
|
|
|
@@ -330246,7 +330300,7 @@ class TestContext {
|
|
|
330246
330300
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
330247
330301
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
330248
330302
|
await core_frontend_1.NoRenderApp.startup({
|
|
330249
|
-
applicationVersion: "5.0.0-dev.
|
|
330303
|
+
applicationVersion: "5.0.0-dev.116",
|
|
330250
330304
|
applicationId: this.settings.gprid,
|
|
330251
330305
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
330252
330306
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -355294,7 +355348,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
355294
355348
|
/***/ ((module) => {
|
|
355295
355349
|
|
|
355296
355350
|
"use strict";
|
|
355297
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.0.0-dev.
|
|
355351
|
+
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"}}');
|
|
355298
355352
|
|
|
355299
355353
|
/***/ }),
|
|
355300
355354
|
|