@itwin/ecschema-rpcinterface-tests 3.4.0-dev.35 → 3.4.0-dev.39
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/_fc1f.bundled-tests.js.map +1 -1
- package/lib/dist/bundled-tests.js +99 -111
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_2_9_node_modules_loaders_gl_draco_di-01256f.bundled-tests.js.map +1 -1
- package/package.json +16 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_fc1f.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\
|
|
1
|
+
{"version":3,"file":"_fc1f.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\vsts_a\\6\\s\\common\\temp\\node_modules\\.pnpm\\@loaders.gl+worker-utils@3.2.9\\node_modules\\@loaders.gl\\worker-utils\\dist\\esm\\lib\\library-utils|../node/require-utils.node"],"names":[],"sourceRoot":""}
|
|
@@ -103770,7 +103770,6 @@ class AccuDraw {
|
|
|
103770
103770
|
let distance;
|
|
103771
103771
|
let projectionVector = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d();
|
|
103772
103772
|
if (perpendicular) {
|
|
103773
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
103774
103773
|
if (AccuDraw.useACSContextRotation(vp, true)) { // Project along ACS axis to AccuDraw plane...
|
|
103775
103774
|
const rMatrix = vp.getAuxCoordRotation(AccuDraw._tempRot);
|
|
103776
103775
|
const axes = ThreeAxes.createFromMatrix3d(rMatrix);
|
|
@@ -104252,7 +104251,6 @@ class AccuDraw {
|
|
|
104252
104251
|
if (!vp || 1.0 !== vp.view.getAspectRatioSkew())
|
|
104253
104252
|
return false; // Disallow AccuDraw being enabled for exaggerated views...
|
|
104254
104253
|
// NOTE: If ACS Plane lock setup initial and base rotation to ACS...
|
|
104255
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
104256
104254
|
if (vp && AccuDraw.useACSContextRotation(vp, false)) {
|
|
104257
104255
|
this.setRotationMode(RotationMode.ACS);
|
|
104258
104256
|
this.flags.baseRotation = RotationMode.ACS;
|
|
@@ -105430,37 +105428,23 @@ class AccuSnap {
|
|
|
105430
105428
|
const parsed = undefined !== json ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.IModelJson.Reader.parse(json) : undefined;
|
|
105431
105429
|
return parsed instanceof _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.GeometryQuery && "curvePrimitive" === parsed.geometryCategory ? parsed : undefined;
|
|
105432
105430
|
};
|
|
105433
|
-
|
|
105434
|
-
|
|
105435
|
-
|
|
105436
|
-
const elevation = undefined !== thisHit.modelId ? thisHit.viewport.view.getModelElevation(thisHit.modelId) : 0;
|
|
105437
|
-
if (0 !== elevation || undefined !== thisHit.viewport.view.modelDisplayTransformProvider) {
|
|
105438
|
-
const adjustedSnapPoint = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d.fromJSON(snapPoint);
|
|
105439
|
-
thisHit.viewport.view.transformPointByModelDisplayTransform(thisHit.modelId, adjustedSnapPoint, false);
|
|
105440
|
-
adjustedSnapPoint.z += elevation;
|
|
105441
|
-
snapPoint = adjustedSnapPoint;
|
|
105442
|
-
}
|
|
105431
|
+
const snapPoint = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d.fromJSON(result.snapPoint);
|
|
105432
|
+
const displayTransform = undefined !== thisHit.modelId ? thisHit.viewport.view.computeDisplayTransform({ modelId: thisHit.modelId, elementId: thisHit.sourceId }) : undefined;
|
|
105433
|
+
displayTransform === null || displayTransform === void 0 ? void 0 : displayTransform.multiplyPoint3d(snapPoint, snapPoint);
|
|
105443
105434
|
const snap = new _HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapDetail(thisHit, result.snapMode, result.heat, snapPoint);
|
|
105444
|
-
|
|
105445
|
-
let transform;
|
|
105446
|
-
if (undefined !== thisHit.modelId && undefined !== thisHit.viewport.view.modelDisplayTransformProvider) {
|
|
105447
|
-
transform = thisHit.viewport.view.getModelDisplayTransform(thisHit.modelId, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity());
|
|
105448
|
-
if (0 !== elevation)
|
|
105449
|
-
transform.origin.set(0, 0, elevation);
|
|
105450
|
-
}
|
|
105451
|
-
else if (0 !== elevation) {
|
|
105452
|
-
transform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createTranslationXYZ(0, 0, elevation);
|
|
105453
|
-
}
|
|
105454
|
-
snap.setCurvePrimitive(parseCurve(result.curve), transform, result.geomType);
|
|
105435
|
+
snap.setCurvePrimitive(parseCurve(result.curve), displayTransform, result.geomType);
|
|
105455
105436
|
if (undefined !== result.parentGeomType)
|
|
105456
105437
|
snap.parentGeomType = result.parentGeomType;
|
|
105438
|
+
// Update hitPoint from readPixels with exact point location corrected to surface/edge geometry.
|
|
105457
105439
|
if (undefined !== result.hitPoint) {
|
|
105458
|
-
snap.hitPoint.setFromJSON(result.hitPoint);
|
|
105459
|
-
|
|
105440
|
+
snap.hitPoint.setFromJSON(result.hitPoint);
|
|
105441
|
+
displayTransform === null || displayTransform === void 0 ? void 0 : displayTransform.multiplyPoint3d(snap.hitPoint, snap.hitPoint);
|
|
105460
105442
|
}
|
|
105443
|
+
// Apply display transform to normal.
|
|
105461
105444
|
if (undefined !== result.normal) {
|
|
105462
105445
|
snap.normal = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.fromJSON(result.normal);
|
|
105463
|
-
|
|
105446
|
+
displayTransform === null || displayTransform === void 0 ? void 0 : displayTransform.matrix.multiplyVector(snap.normal, snap.normal);
|
|
105447
|
+
snap.normal.normalizeInPlace();
|
|
105464
105448
|
}
|
|
105465
105449
|
if (_HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapMode.Intersection !== snap.snapMode)
|
|
105466
105450
|
return snap;
|
|
@@ -122194,8 +122178,9 @@ class ViewState extends _EntityState__WEBPACK_IMPORTED_MODULE_5__.ElementState {
|
|
|
122194
122178
|
* @internal
|
|
122195
122179
|
*/
|
|
122196
122180
|
getModelElevation(_modelId) { return 0; }
|
|
122197
|
-
/**
|
|
122198
|
-
* @note The transform
|
|
122181
|
+
/** An object that can provide per-model transforms to be applied at display time.
|
|
122182
|
+
* @note The transform is used for display purposes only. Operations upon geometry within the model may not take the display transform into account.
|
|
122183
|
+
* @see [[computeDisplayTransform]] to compute a full display transform for a model or an element within it, which may include a transform supplied by this provider.
|
|
122199
122184
|
* @beta
|
|
122200
122185
|
*/
|
|
122201
122186
|
get modelDisplayTransformProvider() {
|
|
@@ -122208,31 +122193,37 @@ class ViewState extends _EntityState__WEBPACK_IMPORTED_MODULE_5__.ElementState {
|
|
|
122208
122193
|
this.onModelDisplayTransformProviderChanged.raiseEvent(provider);
|
|
122209
122194
|
this._modelDisplayTransformProvider = provider;
|
|
122210
122195
|
}
|
|
122211
|
-
/**
|
|
122196
|
+
/** Compute the transform applied to a model or element at display time, if any.
|
|
122197
|
+
* The display transform may be constructed from any combination of the following:
|
|
122198
|
+
* - [PlanProjectionSettings.elevation]($common) applied to plan projection models by [DisplayStyle3dSettings.planProjectionSettings]($common);
|
|
122199
|
+
* - A per-model transform supplied by this view's [[modelDisplayTransformProvider]]; and/or
|
|
122200
|
+
* - A transform applied to an element by an [RenderSchedule.ElementTimeline]($common) defined by this view's [[scheduleScript]].
|
|
122201
|
+
* @param args A description of how to compute the transform.
|
|
122202
|
+
* @returns The computed transform, or `undefined` if no display transform is to be applied.
|
|
122212
122203
|
* @beta
|
|
122213
122204
|
*/
|
|
122214
|
-
|
|
122215
|
-
|
|
122216
|
-
|
|
122217
|
-
|
|
122218
|
-
|
|
122219
|
-
|
|
122220
|
-
|
|
122221
|
-
|
|
122222
|
-
|
|
122223
|
-
|
|
122224
|
-
|
|
122225
|
-
|
|
122226
|
-
|
|
122227
|
-
|
|
122228
|
-
|
|
122229
|
-
|
|
122230
|
-
|
|
122231
|
-
|
|
122232
|
-
|
|
122233
|
-
|
|
122234
|
-
|
|
122235
|
-
|
|
122205
|
+
computeDisplayTransform(args) {
|
|
122206
|
+
var _a, _b, _c;
|
|
122207
|
+
const elevation = this.getModelElevation(args.modelId);
|
|
122208
|
+
const modelTransform = (_a = this.modelDisplayTransformProvider) === null || _a === void 0 ? void 0 : _a.getModelDisplayTransform(args.modelId);
|
|
122209
|
+
// NB: A ModelTimeline can apply a transform to all elements in the model, but no code exists which actually applies that at display time.
|
|
122210
|
+
// So for now we continue to only consider the ElementTimeline transform.
|
|
122211
|
+
let scriptTransform;
|
|
122212
|
+
if (this.scheduleScript && args.elementId) {
|
|
122213
|
+
const idPair = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.getUint32Pair(args.elementId);
|
|
122214
|
+
const modelTimeline = this.scheduleScript.find(args.modelId);
|
|
122215
|
+
const elementTimeline = modelTimeline === null || modelTimeline === void 0 ? void 0 : modelTimeline.getTimelineForElement(idPair.lower, idPair.upper);
|
|
122216
|
+
scriptTransform = elementTimeline === null || elementTimeline === void 0 ? void 0 : elementTimeline.getAnimationTransform((_c = (_b = args.timePoint) !== null && _b !== void 0 ? _b : this.displayStyle.settings.timePoint) !== null && _c !== void 0 ? _c : 0);
|
|
122217
|
+
}
|
|
122218
|
+
if (0 === elevation && !modelTransform && !scriptTransform)
|
|
122219
|
+
return undefined;
|
|
122220
|
+
const transform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity(args.output);
|
|
122221
|
+
transform.origin.z = elevation;
|
|
122222
|
+
if (modelTransform)
|
|
122223
|
+
transform.multiplyTransformTransform(modelTransform, transform);
|
|
122224
|
+
if (scriptTransform)
|
|
122225
|
+
transform.multiplyTransformTransform(scriptTransform, transform);
|
|
122226
|
+
return transform;
|
|
122236
122227
|
}
|
|
122237
122228
|
/** Invoked when this view becomes the view displayed by the specified [[Viewport]].
|
|
122238
122229
|
* A ViewState can be attached to at most **one** Viewport.
|
|
@@ -125679,7 +125670,7 @@ class Viewport {
|
|
|
125679
125670
|
* @see [[getPixelDataNpcPoint]] to obtain the point in [[CoordSystem.Npc]].
|
|
125680
125671
|
*/
|
|
125681
125672
|
getPixelDataWorldPoint(args) {
|
|
125682
|
-
var _a;
|
|
125673
|
+
var _a, _b;
|
|
125683
125674
|
const { pixels, x, y, out, preserveModelDisplayTransforms } = args;
|
|
125684
125675
|
const npc = this.getPixelDataNpcPoint(pixels, x, y, out);
|
|
125685
125676
|
if (undefined !== npc) {
|
|
@@ -125687,10 +125678,11 @@ class Viewport {
|
|
|
125687
125678
|
// If this is a plan projection model, invert the elevation applied to its display transform.
|
|
125688
125679
|
// Likewise, if it is a hit on a model with a display transform, reverse the display transform.
|
|
125689
125680
|
if (!preserveModelDisplayTransforms) {
|
|
125690
|
-
const
|
|
125681
|
+
const pixel = pixels.getPixel(x, y);
|
|
125682
|
+
const modelId = (_a = pixel.featureTable) === null || _a === void 0 ? void 0 : _a.modelId;
|
|
125691
125683
|
if (undefined !== modelId) {
|
|
125692
|
-
|
|
125693
|
-
|
|
125684
|
+
const transform = this.view.computeDisplayTransform({ modelId, elementId: (_b = pixel.feature) === null || _b === void 0 ? void 0 : _b.elementId });
|
|
125685
|
+
transform === null || transform === void 0 ? void 0 : transform.multiplyInversePoint3d(npc, npc);
|
|
125694
125686
|
}
|
|
125695
125687
|
}
|
|
125696
125688
|
}
|
|
@@ -170547,16 +170539,17 @@ class PrimaryTreeReference extends _internal__WEBPACK_IMPORTED_MODULE_5__.TileTr
|
|
|
170547
170539
|
this._owner = primaryTreeSupplier.getOwner(this._id, model.iModel);
|
|
170548
170540
|
}
|
|
170549
170541
|
checkForceNoInstancing(provider) {
|
|
170550
|
-
|
|
170542
|
+
var _a;
|
|
170551
170543
|
// If this model has a display transform with a non-uniform scale then instancing needs to be forced off when using WebGL1.
|
|
170552
|
-
|
|
170553
|
-
|
|
170554
|
-
|
|
170555
|
-
|
|
170556
|
-
|
|
170557
|
-
|
|
170558
|
-
|
|
170559
|
-
|
|
170544
|
+
this._forceNoInstancing = false;
|
|
170545
|
+
const mat = (_a = provider === null || provider === void 0 ? void 0 : provider.getModelDisplayTransform(this.model.id)) === null || _a === void 0 ? void 0 : _a.matrix;
|
|
170546
|
+
if (!mat)
|
|
170547
|
+
return;
|
|
170548
|
+
const epsilon = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance;
|
|
170549
|
+
const sx = mat.getColumn(0).magnitudeSquared();
|
|
170550
|
+
const sy = mat.getColumn(1).magnitudeSquared();
|
|
170551
|
+
if (Math.abs(sx - sy) > epsilon || Math.abs(sx - mat.getColumn(2).magnitudeSquared()) > epsilon)
|
|
170552
|
+
this._forceNoInstancing = true;
|
|
170560
170553
|
}
|
|
170561
170554
|
getAnimationTransformNodeId() {
|
|
170562
170555
|
var _a;
|
|
@@ -170632,8 +170625,10 @@ class PrimaryTreeReference extends _internal__WEBPACK_IMPORTED_MODULE_5__.TileTr
|
|
|
170632
170625
|
return super.computeTransform(tree);
|
|
170633
170626
|
}
|
|
170634
170627
|
computeTransform(tree) {
|
|
170635
|
-
|
|
170636
|
-
|
|
170628
|
+
var _a;
|
|
170629
|
+
const baseTf = this.computeBaseTransform(tree);
|
|
170630
|
+
const displayTf = (_a = this.view.modelDisplayTransformProvider) === null || _a === void 0 ? void 0 : _a.getModelDisplayTransform(this.model.id);
|
|
170631
|
+
return displayTf ? baseTf.multiplyTransformTransform(displayTf, displayTf) : baseTf;
|
|
170637
170632
|
}
|
|
170638
170633
|
}
|
|
170639
170634
|
/** @internal */
|
|
@@ -174364,33 +174359,27 @@ class TileDrawArgs {
|
|
|
174364
174359
|
return this.viewingSpace.worldToViewMap;
|
|
174365
174360
|
}
|
|
174366
174361
|
computePixelSizeScaleFactor() {
|
|
174362
|
+
var _a, _b;
|
|
174367
174363
|
// Check to see if a model display transform with non-uniform scaling is being used.
|
|
174368
|
-
const
|
|
174369
|
-
|
|
174370
|
-
|
|
174371
|
-
scale[1]
|
|
174372
|
-
scale[2] = tf.matrix.getColumn(2).magnitude();
|
|
174364
|
+
const mat = (_b = (_a = this.context.viewport.view.modelDisplayTransformProvider) === null || _a === void 0 ? void 0 : _a.getModelDisplayTransform(this.tree.modelId)) === null || _b === void 0 ? void 0 : _b.matrix;
|
|
174365
|
+
if (!mat)
|
|
174366
|
+
return 1;
|
|
174367
|
+
const scale = [0, 1, 2].map((x) => mat.getColumn(x).magnitude());
|
|
174373
174368
|
if (Math.abs(scale[0] - scale[1]) <= _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistance && Math.abs(scale[0] - scale[2]) <= _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.smallMetricDistance)
|
|
174374
174369
|
return 1;
|
|
174375
174370
|
// If the component with the largest scale is not the same as the component with the largest tile range use it to adjust the pixel size.
|
|
174376
174371
|
const rangeDiag = this.tree.range.diagonal();
|
|
174377
174372
|
let maxS = 0;
|
|
174378
174373
|
let maxR = 0;
|
|
174379
|
-
if (scale[0] > scale[1])
|
|
174374
|
+
if (scale[0] > scale[1])
|
|
174380
174375
|
maxS = (scale[0] > scale[2] ? 0 : 2);
|
|
174381
|
-
|
|
174382
|
-
else {
|
|
174376
|
+
else
|
|
174383
174377
|
maxS = (scale[1] > scale[2] ? 1 : 2);
|
|
174384
|
-
|
|
174385
|
-
if (rangeDiag.x > rangeDiag.y) {
|
|
174378
|
+
if (rangeDiag.x > rangeDiag.y)
|
|
174386
174379
|
maxR = (rangeDiag.x > rangeDiag.z ? 0 : 2);
|
|
174387
|
-
|
|
174388
|
-
else {
|
|
174380
|
+
else
|
|
174389
174381
|
maxR = (rangeDiag.y > rangeDiag.z ? 1 : 2);
|
|
174390
|
-
|
|
174391
|
-
if (maxS !== maxR)
|
|
174392
|
-
return scale[maxS];
|
|
174393
|
-
return 1;
|
|
174382
|
+
return maxS !== maxR ? scale[maxS] : 1;
|
|
174394
174383
|
}
|
|
174395
174384
|
/** A multiplier applied to a [[Tile]]'s `maximumSize` property to adjust level of detail.
|
|
174396
174385
|
* @see [[Viewport.tileSizeModifier]].
|
|
@@ -184660,21 +184649,25 @@ class ViewClipByElementTool extends ViewClipTool {
|
|
|
184660
184649
|
await this.exitTool();
|
|
184661
184650
|
return false;
|
|
184662
184651
|
}
|
|
184663
|
-
async doClipToElements(viewport, ids, alwaysUseRange = false) {
|
|
184652
|
+
async doClipToElements(viewport, ids, alwaysUseRange = false, modelId) {
|
|
184664
184653
|
try {
|
|
184665
184654
|
const placements = await viewport.iModel.elements.getPlacements(ids, { type: viewport.view.is3d() ? "3d" : "2d" });
|
|
184666
184655
|
if (0 === placements.length)
|
|
184667
184656
|
return false;
|
|
184657
|
+
const displayTransform = modelId && 1 === placements.length ? viewport.view.computeDisplayTransform({ modelId, elementId: placements[0].elementId }) : undefined;
|
|
184668
184658
|
const range = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d();
|
|
184669
184659
|
const transform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
|
|
184670
184660
|
if (!alwaysUseRange && 1 === placements.length) {
|
|
184671
184661
|
const placement = placements[0];
|
|
184672
184662
|
range.setFrom(placement instanceof _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Placement2d ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d.createRange2d(placement.bbox, 0) : placement.bbox);
|
|
184673
184663
|
transform.setFrom(placement.transform); // Use ElementAlignedBox for single selection...
|
|
184664
|
+
displayTransform === null || displayTransform === void 0 ? void 0 : displayTransform.multiplyTransformTransform(transform, transform);
|
|
184674
184665
|
}
|
|
184675
184666
|
else {
|
|
184676
184667
|
for (const placement of placements)
|
|
184677
184668
|
range.extendRange(placement.calculateRange());
|
|
184669
|
+
if (displayTransform)
|
|
184670
|
+
transform.setFrom(displayTransform);
|
|
184678
184671
|
}
|
|
184679
184672
|
if (range.isNull)
|
|
184680
184673
|
return false;
|
|
@@ -184724,7 +184717,7 @@ class ViewClipByElementTool extends ViewClipTool {
|
|
|
184724
184717
|
const hit = await _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.locateManager.doLocate(new _ElementLocateManager__WEBPACK_IMPORTED_MODULE_5__.LocateResponse(), true, ev.point, ev.viewport, ev.inputSource);
|
|
184725
184718
|
if (undefined === hit || !hit.isElementHit)
|
|
184726
184719
|
return _Tool__WEBPACK_IMPORTED_MODULE_10__.EventHandled.No;
|
|
184727
|
-
return await this.doClipToElements(this.targetView, hit.sourceId, this._alwaysUseRange) ? _Tool__WEBPACK_IMPORTED_MODULE_10__.EventHandled.Yes : _Tool__WEBPACK_IMPORTED_MODULE_10__.EventHandled.No;
|
|
184720
|
+
return await this.doClipToElements(this.targetView, hit.sourceId, this._alwaysUseRange, hit.modelId) ? _Tool__WEBPACK_IMPORTED_MODULE_10__.EventHandled.Yes : _Tool__WEBPACK_IMPORTED_MODULE_10__.EventHandled.No;
|
|
184728
184721
|
}
|
|
184729
184722
|
}
|
|
184730
184723
|
ViewClipByElementTool.toolId = "ViewClip.ByElement";
|
|
@@ -187091,33 +187084,28 @@ class MeasureMarker extends _Marker__WEBPACK_IMPORTED_MODULE_7__.Marker {
|
|
|
187091
187084
|
}
|
|
187092
187085
|
/** @internal */
|
|
187093
187086
|
function adjustPoint(ev, segments, locations) {
|
|
187094
|
-
|
|
187095
|
-
|
|
187087
|
+
var _a;
|
|
187088
|
+
// If the point was from a hit we must transform it by the display transform of what got hit.
|
|
187089
|
+
const hit = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuSnap.currHit;
|
|
187090
|
+
if (!hit || !ev.viewport || !hit.modelId)
|
|
187096
187091
|
return ev.point;
|
|
187097
|
-
if (
|
|
187098
|
-
|
|
187099
|
-
|
|
187100
|
-
|
|
187101
|
-
|
|
187102
|
-
|
|
187103
|
-
|
|
187104
|
-
|
|
187105
|
-
|
|
187106
|
-
|
|
187107
|
-
|
|
187108
|
-
|
|
187109
|
-
|
|
187110
|
-
|
|
187111
|
-
|
|
187112
|
-
|
|
187113
|
-
|
|
187114
|
-
for (const loc of locations) {
|
|
187115
|
-
if (loc.point.isExactEqual(ev.point))
|
|
187116
|
-
return loc.adjustedPoint.clone();
|
|
187117
|
-
}
|
|
187118
|
-
}
|
|
187119
|
-
}
|
|
187120
|
-
}
|
|
187092
|
+
if ("0" !== hit.modelId) {
|
|
187093
|
+
const transform = ev.viewport.view.computeDisplayTransform({ modelId: hit.modelId, elementId: hit.sourceId });
|
|
187094
|
+
return (_a = transform === null || transform === void 0 ? void 0 : transform.multiplyInversePoint3d(ev.point)) !== null && _a !== void 0 ? _a : ev.point;
|
|
187095
|
+
}
|
|
187096
|
+
// Must have snapped to a decoration, so look through previous any segments & locations for a match to get an adjusted point.
|
|
187097
|
+
if (segments) {
|
|
187098
|
+
for (const seg of segments) {
|
|
187099
|
+
if (seg.start.isExactEqual(ev.point))
|
|
187100
|
+
return seg.adjustedStart.clone();
|
|
187101
|
+
if (seg.end.isExactEqual(ev.point))
|
|
187102
|
+
return seg.adjustedEnd.clone();
|
|
187103
|
+
}
|
|
187104
|
+
}
|
|
187105
|
+
if (locations)
|
|
187106
|
+
for (const loc of locations)
|
|
187107
|
+
if (loc.point.isExactEqual(ev.point))
|
|
187108
|
+
return loc.adjustedPoint.clone();
|
|
187121
187109
|
return ev.point;
|
|
187122
187110
|
}
|
|
187123
187111
|
/** Report distance between 2 points using current quantity formatter for length.
|
|
@@ -305960,7 +305948,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
305960
305948
|
/***/ ((module) => {
|
|
305961
305949
|
|
|
305962
305950
|
"use strict";
|
|
305963
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.4.0-dev.
|
|
305951
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.4.0-dev.39","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","build:ci":"npm run -s build && npm run -s build:esm","build:cjs":"tsc 1>&2 --outDir lib/cjs","build:esm":"tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/primitives,**/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-eslintrc -c \\"../../tools/eslint-plugin/dist/configs/extension-exports-config.js\\" \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core/tree/master/core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^3.4.0-dev.39","@itwin/core-bentley":"workspace:^3.4.0-dev.39","@itwin/core-common":"workspace:^3.4.0-dev.39","@itwin/core-geometry":"workspace:^3.4.0-dev.39","@itwin/core-orbitgt":"workspace:^3.4.0-dev.39","@itwin/core-quantity":"workspace:^3.4.0-dev.39","@itwin/webgl-compatibility":"workspace:^3.4.0-dev.39"},"//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/certa":"workspace:*","@itwin/eslint-plugin":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/deep-assign":"^0.1.0","@types/lodash":"^4.14.0","@types/mocha":"^8.2.2","@types/node":"16.11.7","@types/qs":"^6.5.0","@types/semver":"7.3.10","@types/superagent":"^4.1.14","@types/sinon":"^9.0.0","chai":"^4.1.2","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^7.11.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^9.0.2","source-map-loader":"^4.0.0","typescript":"~4.4.0","webpack":"^5.64.4"},"//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/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","deep-assign":"^2.0.0","fuse.js":"^3.3.0","lodash":"^4.17.10","qs":"^6.5.1","semver":"^7.3.5","superagent":"7.1.3","wms-capabilities":"0.4.0","xml-js":"~1.6.11"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"},"eslintConfig":{"plugins":["@itwin"],"extends":"plugin:@itwin/itwinjs-recommended","rules":{"@itwin/no-internal-barrel-imports":["error",{"required-barrel-modules":["./src/tile/internal.ts"]}],"@itwin/public-extension-exports":["error",{"releaseTags":["public","preview"],"outputApiFile":false}]},"overrides":[{"files":["*.test.ts","*.test.tsx","**/test/**/*.ts"],"rules":{"@itwin/no-internal-barrel-imports":"off"}}]}}');
|
|
305964
305952
|
|
|
305965
305953
|
/***/ })
|
|
305966
305954
|
|