@itwin/rpcinterface-full-stack-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.
@@ -1 +1 @@
1
- {"version":3,"file":"_fc1f.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\vsts_b\\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":""}
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":""}
@@ -94439,7 +94439,6 @@ class AccuDraw {
94439
94439
  let distance;
94440
94440
  let projectionVector = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d();
94441
94441
  if (perpendicular) {
94442
- // eslint-disable-next-line react-hooks/rules-of-hooks
94443
94442
  if (AccuDraw.useACSContextRotation(vp, true)) { // Project along ACS axis to AccuDraw plane...
94444
94443
  const rMatrix = vp.getAuxCoordRotation(AccuDraw._tempRot);
94445
94444
  const axes = ThreeAxes.createFromMatrix3d(rMatrix);
@@ -94921,7 +94920,6 @@ class AccuDraw {
94921
94920
  if (!vp || 1.0 !== vp.view.getAspectRatioSkew())
94922
94921
  return false; // Disallow AccuDraw being enabled for exaggerated views...
94923
94922
  // NOTE: If ACS Plane lock setup initial and base rotation to ACS...
94924
- // eslint-disable-next-line react-hooks/rules-of-hooks
94925
94923
  if (vp && AccuDraw.useACSContextRotation(vp, false)) {
94926
94924
  this.setRotationMode(RotationMode.ACS);
94927
94925
  this.flags.baseRotation = RotationMode.ACS;
@@ -96099,37 +96097,23 @@ class AccuSnap {
96099
96097
  const parsed = undefined !== json ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.IModelJson.Reader.parse(json) : undefined;
96100
96098
  return parsed instanceof _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.GeometryQuery && "curvePrimitive" === parsed.geometryCategory ? parsed : undefined;
96101
96099
  };
96102
- // If this hit is from a plan projection model, apply the model's elevation to the snap point for display.
96103
- // Likewise, if it is a hit on a model with a display transform, apply the model's transform to the snap point.
96104
- let snapPoint = result.snapPoint;
96105
- const elevation = undefined !== thisHit.modelId ? thisHit.viewport.view.getModelElevation(thisHit.modelId) : 0;
96106
- if (0 !== elevation || undefined !== thisHit.viewport.view.modelDisplayTransformProvider) {
96107
- const adjustedSnapPoint = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d.fromJSON(snapPoint);
96108
- thisHit.viewport.view.transformPointByModelDisplayTransform(thisHit.modelId, adjustedSnapPoint, false);
96109
- adjustedSnapPoint.z += elevation;
96110
- snapPoint = adjustedSnapPoint;
96111
- }
96100
+ const snapPoint = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d.fromJSON(result.snapPoint);
96101
+ const displayTransform = undefined !== thisHit.modelId ? thisHit.viewport.view.computeDisplayTransform({ modelId: thisHit.modelId, elementId: thisHit.sourceId }) : undefined;
96102
+ displayTransform === null || displayTransform === void 0 ? void 0 : displayTransform.multiplyPoint3d(snapPoint, snapPoint);
96112
96103
  const snap = new _HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapDetail(thisHit, result.snapMode, result.heat, snapPoint);
96113
- // Apply model's elevation and display transform to curve for display.
96114
- let transform;
96115
- if (undefined !== thisHit.modelId && undefined !== thisHit.viewport.view.modelDisplayTransformProvider) {
96116
- transform = thisHit.viewport.view.getModelDisplayTransform(thisHit.modelId, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity());
96117
- if (0 !== elevation)
96118
- transform.origin.set(0, 0, elevation);
96119
- }
96120
- else if (0 !== elevation) {
96121
- transform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createTranslationXYZ(0, 0, elevation);
96122
- }
96123
- snap.setCurvePrimitive(parseCurve(result.curve), transform, result.geomType);
96104
+ snap.setCurvePrimitive(parseCurve(result.curve), displayTransform, result.geomType);
96124
96105
  if (undefined !== result.parentGeomType)
96125
96106
  snap.parentGeomType = result.parentGeomType;
96107
+ // Update hitPoint from readPixels with exact point location corrected to surface/edge geometry.
96126
96108
  if (undefined !== result.hitPoint) {
96127
- snap.hitPoint.setFromJSON(result.hitPoint); // Update hitPoint from readPixels with exact point location corrected to surface/edge geometry...
96128
- thisHit.viewport.view.transformPointByModelDisplayTransform(thisHit.modelId, snap.hitPoint, false);
96109
+ snap.hitPoint.setFromJSON(result.hitPoint);
96110
+ displayTransform === null || displayTransform === void 0 ? void 0 : displayTransform.multiplyPoint3d(snap.hitPoint, snap.hitPoint);
96129
96111
  }
96112
+ // Apply display transform to normal.
96130
96113
  if (undefined !== result.normal) {
96131
96114
  snap.normal = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.fromJSON(result.normal);
96132
- thisHit.viewport.view.transformNormalByModelDisplayTransform(thisHit.modelId, snap.normal);
96115
+ displayTransform === null || displayTransform === void 0 ? void 0 : displayTransform.matrix.multiplyVector(snap.normal, snap.normal);
96116
+ snap.normal.normalizeInPlace();
96133
96117
  }
96134
96118
  if (_HitDetail__WEBPACK_IMPORTED_MODULE_3__.SnapMode.Intersection !== snap.snapMode)
96135
96119
  return snap;
@@ -112863,8 +112847,9 @@ class ViewState extends _EntityState__WEBPACK_IMPORTED_MODULE_5__.ElementState {
112863
112847
  * @internal
112864
112848
  */
112865
112849
  getModelElevation(_modelId) { return 0; }
112866
- /** Specify a provider of per-model display transforms. Intended chiefly for use by model alignment tools.
112867
- * @note The transform supplied is used for display purposes **only**. Do not expect operations like snapping to account for the display transform.
112850
+ /** An object that can provide per-model transforms to be applied at display time.
112851
+ * @note The transform is used for display purposes only. Operations upon geometry within the model may not take the display transform into account.
112852
+ * @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.
112868
112853
  * @beta
112869
112854
  */
112870
112855
  get modelDisplayTransformProvider() {
@@ -112877,31 +112862,37 @@ class ViewState extends _EntityState__WEBPACK_IMPORTED_MODULE_5__.ElementState {
112877
112862
  this.onModelDisplayTransformProviderChanged.raiseEvent(provider);
112878
112863
  this._modelDisplayTransformProvider = provider;
112879
112864
  }
112880
- /** Obtain the transform with which the specified model will be displayed, accounting for this view's [[ModelDisplayTransformProvider]].
112865
+ /** Compute the transform applied to a model or element at display time, if any.
112866
+ * The display transform may be constructed from any combination of the following:
112867
+ * - [PlanProjectionSettings.elevation]($common) applied to plan projection models by [DisplayStyle3dSettings.planProjectionSettings]($common);
112868
+ * - A per-model transform supplied by this view's [[modelDisplayTransformProvider]]; and/or
112869
+ * - A transform applied to an element by an [RenderSchedule.ElementTimeline]($common) defined by this view's [[scheduleScript]].
112870
+ * @param args A description of how to compute the transform.
112871
+ * @returns The computed transform, or `undefined` if no display transform is to be applied.
112881
112872
  * @beta
112882
112873
  */
112883
- getModelDisplayTransform(modelId, baseTransform) {
112884
- return this.modelDisplayTransformProvider ? this.modelDisplayTransformProvider.getModelDisplayTransform(modelId, baseTransform) : baseTransform;
112885
- }
112886
- /** @internal */
112887
- transformPointByModelDisplayTransform(modelId, pnt, inverse) {
112888
- if (undefined !== modelId && undefined !== this.modelDisplayTransformProvider) {
112889
- const transform = this.modelDisplayTransformProvider.getModelDisplayTransform(modelId, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity());
112890
- const newPnt = inverse ? transform.multiplyInversePoint3d(pnt) : transform.multiplyPoint3d(pnt);
112891
- if (undefined !== newPnt)
112892
- pnt.set(newPnt.x, newPnt.y, newPnt.z);
112893
- }
112894
- }
112895
- /** @internal */
112896
- transformNormalByModelDisplayTransform(modelId, normal) {
112897
- if (undefined !== modelId && undefined !== this.modelDisplayTransformProvider) {
112898
- const transform = this.modelDisplayTransformProvider.getModelDisplayTransform(modelId, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity());
112899
- const newVec = transform.matrix.multiplyInverse(normal);
112900
- if (undefined !== newVec) {
112901
- newVec.normalizeInPlace();
112902
- normal.set(newVec.x, newVec.y, newVec.z);
112903
- }
112904
- }
112874
+ computeDisplayTransform(args) {
112875
+ var _a, _b, _c;
112876
+ const elevation = this.getModelElevation(args.modelId);
112877
+ const modelTransform = (_a = this.modelDisplayTransformProvider) === null || _a === void 0 ? void 0 : _a.getModelDisplayTransform(args.modelId);
112878
+ // NB: A ModelTimeline can apply a transform to all elements in the model, but no code exists which actually applies that at display time.
112879
+ // So for now we continue to only consider the ElementTimeline transform.
112880
+ let scriptTransform;
112881
+ if (this.scheduleScript && args.elementId) {
112882
+ const idPair = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.getUint32Pair(args.elementId);
112883
+ const modelTimeline = this.scheduleScript.find(args.modelId);
112884
+ const elementTimeline = modelTimeline === null || modelTimeline === void 0 ? void 0 : modelTimeline.getTimelineForElement(idPair.lower, idPair.upper);
112885
+ 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);
112886
+ }
112887
+ if (0 === elevation && !modelTransform && !scriptTransform)
112888
+ return undefined;
112889
+ const transform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity(args.output);
112890
+ transform.origin.z = elevation;
112891
+ if (modelTransform)
112892
+ transform.multiplyTransformTransform(modelTransform, transform);
112893
+ if (scriptTransform)
112894
+ transform.multiplyTransformTransform(scriptTransform, transform);
112895
+ return transform;
112905
112896
  }
112906
112897
  /** Invoked when this view becomes the view displayed by the specified [[Viewport]].
112907
112898
  * A ViewState can be attached to at most **one** Viewport.
@@ -116348,7 +116339,7 @@ class Viewport {
116348
116339
  * @see [[getPixelDataNpcPoint]] to obtain the point in [[CoordSystem.Npc]].
116349
116340
  */
116350
116341
  getPixelDataWorldPoint(args) {
116351
- var _a;
116342
+ var _a, _b;
116352
116343
  const { pixels, x, y, out, preserveModelDisplayTransforms } = args;
116353
116344
  const npc = this.getPixelDataNpcPoint(pixels, x, y, out);
116354
116345
  if (undefined !== npc) {
@@ -116356,10 +116347,11 @@ class Viewport {
116356
116347
  // If this is a plan projection model, invert the elevation applied to its display transform.
116357
116348
  // Likewise, if it is a hit on a model with a display transform, reverse the display transform.
116358
116349
  if (!preserveModelDisplayTransforms) {
116359
- const modelId = (_a = pixels.getPixel(x, y).featureTable) === null || _a === void 0 ? void 0 : _a.modelId;
116350
+ const pixel = pixels.getPixel(x, y);
116351
+ const modelId = (_a = pixel.featureTable) === null || _a === void 0 ? void 0 : _a.modelId;
116360
116352
  if (undefined !== modelId) {
116361
- npc.z -= this.view.getModelElevation(modelId);
116362
- this.view.transformPointByModelDisplayTransform(modelId, npc, true);
116353
+ const transform = this.view.computeDisplayTransform({ modelId, elementId: (_b = pixel.feature) === null || _b === void 0 ? void 0 : _b.elementId });
116354
+ transform === null || transform === void 0 ? void 0 : transform.multiplyInversePoint3d(npc, npc);
116363
116355
  }
116364
116356
  }
116365
116357
  }
@@ -161216,16 +161208,17 @@ class PrimaryTreeReference extends _internal__WEBPACK_IMPORTED_MODULE_5__.TileTr
161216
161208
  this._owner = primaryTreeSupplier.getOwner(this._id, model.iModel);
161217
161209
  }
161218
161210
  checkForceNoInstancing(provider) {
161219
- this._forceNoInstancing = false;
161211
+ var _a;
161220
161212
  // If this model has a display transform with a non-uniform scale then instancing needs to be forced off when using WebGL1.
161221
- if (undefined !== provider) {
161222
- const tf = provider.getModelDisplayTransform(this.model.id, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Transform.createIdentity());
161223
- const sx = tf.matrix.getColumn(0).magnitudeSquared();
161224
- const sy = tf.matrix.getColumn(1).magnitudeSquared();
161225
- const sz = tf.matrix.getColumn(2).magnitudeSquared();
161226
- if (Math.abs(sx - sy) > _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance || Math.abs(sx - sz) > _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance)
161227
- this._forceNoInstancing = true;
161228
- }
161213
+ this._forceNoInstancing = false;
161214
+ const mat = (_a = provider === null || provider === void 0 ? void 0 : provider.getModelDisplayTransform(this.model.id)) === null || _a === void 0 ? void 0 : _a.matrix;
161215
+ if (!mat)
161216
+ return;
161217
+ const epsilon = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Geometry.smallMetricDistance;
161218
+ const sx = mat.getColumn(0).magnitudeSquared();
161219
+ const sy = mat.getColumn(1).magnitudeSquared();
161220
+ if (Math.abs(sx - sy) > epsilon || Math.abs(sx - mat.getColumn(2).magnitudeSquared()) > epsilon)
161221
+ this._forceNoInstancing = true;
161229
161222
  }
161230
161223
  getAnimationTransformNodeId() {
161231
161224
  var _a;
@@ -161301,8 +161294,10 @@ class PrimaryTreeReference extends _internal__WEBPACK_IMPORTED_MODULE_5__.TileTr
161301
161294
  return super.computeTransform(tree);
161302
161295
  }
161303
161296
  computeTransform(tree) {
161304
- const tf = this.computeBaseTransform(tree);
161305
- return this.view.getModelDisplayTransform(this.model.id, tf);
161297
+ var _a;
161298
+ const baseTf = this.computeBaseTransform(tree);
161299
+ const displayTf = (_a = this.view.modelDisplayTransformProvider) === null || _a === void 0 ? void 0 : _a.getModelDisplayTransform(this.model.id);
161300
+ return displayTf ? baseTf.multiplyTransformTransform(displayTf, displayTf) : baseTf;
161306
161301
  }
161307
161302
  }
161308
161303
  /** @internal */
@@ -165033,33 +165028,27 @@ class TileDrawArgs {
165033
165028
  return this.viewingSpace.worldToViewMap;
165034
165029
  }
165035
165030
  computePixelSizeScaleFactor() {
165031
+ var _a, _b;
165036
165032
  // Check to see if a model display transform with non-uniform scaling is being used.
165037
- const tf = this.context.viewport.view.getModelDisplayTransform(this.tree.modelId, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createIdentity());
165038
- const scale = [];
165039
- scale[0] = tf.matrix.getColumn(0).magnitude();
165040
- scale[1] = tf.matrix.getColumn(1).magnitude();
165041
- scale[2] = tf.matrix.getColumn(2).magnitude();
165033
+ 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;
165034
+ if (!mat)
165035
+ return 1;
165036
+ const scale = [0, 1, 2].map((x) => mat.getColumn(x).magnitude());
165042
165037
  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)
165043
165038
  return 1;
165044
165039
  // 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.
165045
165040
  const rangeDiag = this.tree.range.diagonal();
165046
165041
  let maxS = 0;
165047
165042
  let maxR = 0;
165048
- if (scale[0] > scale[1]) {
165043
+ if (scale[0] > scale[1])
165049
165044
  maxS = (scale[0] > scale[2] ? 0 : 2);
165050
- }
165051
- else {
165045
+ else
165052
165046
  maxS = (scale[1] > scale[2] ? 1 : 2);
165053
- }
165054
- if (rangeDiag.x > rangeDiag.y) {
165047
+ if (rangeDiag.x > rangeDiag.y)
165055
165048
  maxR = (rangeDiag.x > rangeDiag.z ? 0 : 2);
165056
- }
165057
- else {
165049
+ else
165058
165050
  maxR = (rangeDiag.y > rangeDiag.z ? 1 : 2);
165059
- }
165060
- if (maxS !== maxR)
165061
- return scale[maxS];
165062
- return 1;
165051
+ return maxS !== maxR ? scale[maxS] : 1;
165063
165052
  }
165064
165053
  /** A multiplier applied to a [[Tile]]'s `maximumSize` property to adjust level of detail.
165065
165054
  * @see [[Viewport.tileSizeModifier]].
@@ -175329,21 +175318,25 @@ class ViewClipByElementTool extends ViewClipTool {
175329
175318
  await this.exitTool();
175330
175319
  return false;
175331
175320
  }
175332
- async doClipToElements(viewport, ids, alwaysUseRange = false) {
175321
+ async doClipToElements(viewport, ids, alwaysUseRange = false, modelId) {
175333
175322
  try {
175334
175323
  const placements = await viewport.iModel.elements.getPlacements(ids, { type: viewport.view.is3d() ? "3d" : "2d" });
175335
175324
  if (0 === placements.length)
175336
175325
  return false;
175326
+ const displayTransform = modelId && 1 === placements.length ? viewport.view.computeDisplayTransform({ modelId, elementId: placements[0].elementId }) : undefined;
175337
175327
  const range = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d();
175338
175328
  const transform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
175339
175329
  if (!alwaysUseRange && 1 === placements.length) {
175340
175330
  const placement = placements[0];
175341
175331
  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);
175342
175332
  transform.setFrom(placement.transform); // Use ElementAlignedBox for single selection...
175333
+ displayTransform === null || displayTransform === void 0 ? void 0 : displayTransform.multiplyTransformTransform(transform, transform);
175343
175334
  }
175344
175335
  else {
175345
175336
  for (const placement of placements)
175346
175337
  range.extendRange(placement.calculateRange());
175338
+ if (displayTransform)
175339
+ transform.setFrom(displayTransform);
175347
175340
  }
175348
175341
  if (range.isNull)
175349
175342
  return false;
@@ -175393,7 +175386,7 @@ class ViewClipByElementTool extends ViewClipTool {
175393
175386
  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);
175394
175387
  if (undefined === hit || !hit.isElementHit)
175395
175388
  return _Tool__WEBPACK_IMPORTED_MODULE_10__.EventHandled.No;
175396
- return await this.doClipToElements(this.targetView, hit.sourceId, this._alwaysUseRange) ? _Tool__WEBPACK_IMPORTED_MODULE_10__.EventHandled.Yes : _Tool__WEBPACK_IMPORTED_MODULE_10__.EventHandled.No;
175389
+ 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;
175397
175390
  }
175398
175391
  }
175399
175392
  ViewClipByElementTool.toolId = "ViewClip.ByElement";
@@ -177760,33 +177753,28 @@ class MeasureMarker extends _Marker__WEBPACK_IMPORTED_MODULE_7__.Marker {
177760
177753
  }
177761
177754
  /** @internal */
177762
177755
  function adjustPoint(ev, segments, locations) {
177763
- // If the point was from a hit we must transform it by the model display transform of what got hit.
177764
- if (undefined === ev.viewport || undefined === ev.viewport.view.modelDisplayTransformProvider)
177756
+ var _a;
177757
+ // If the point was from a hit we must transform it by the display transform of what got hit.
177758
+ const hit = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuSnap.currHit;
177759
+ if (!hit || !ev.viewport || !hit.modelId)
177765
177760
  return ev.point;
177766
- if (undefined !== _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuSnap.currHit && undefined !== _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuSnap.currHit.modelId) {
177767
- if ("0" !== _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuSnap.currHit.modelId) {
177768
- const newPoint = ev.point.clone();
177769
- ev.viewport.view.transformPointByModelDisplayTransform(_IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuSnap.currHit.modelId, newPoint, true);
177770
- return newPoint;
177771
- }
177772
- else {
177773
- // Must have snapped to a decoration, so look through previous any segments & locations for a match to get an adjusted point.
177774
- if (undefined !== segments) {
177775
- for (const seg of segments) {
177776
- if (seg.start.isExactEqual(ev.point))
177777
- return seg.adjustedStart.clone();
177778
- if (seg.end.isExactEqual(ev.point))
177779
- return seg.adjustedEnd.clone();
177780
- }
177781
- }
177782
- if (undefined !== locations) {
177783
- for (const loc of locations) {
177784
- if (loc.point.isExactEqual(ev.point))
177785
- return loc.adjustedPoint.clone();
177786
- }
177787
- }
177788
- }
177789
- }
177761
+ if ("0" !== hit.modelId) {
177762
+ const transform = ev.viewport.view.computeDisplayTransform({ modelId: hit.modelId, elementId: hit.sourceId });
177763
+ return (_a = transform === null || transform === void 0 ? void 0 : transform.multiplyInversePoint3d(ev.point)) !== null && _a !== void 0 ? _a : ev.point;
177764
+ }
177765
+ // Must have snapped to a decoration, so look through previous any segments & locations for a match to get an adjusted point.
177766
+ if (segments) {
177767
+ for (const seg of segments) {
177768
+ if (seg.start.isExactEqual(ev.point))
177769
+ return seg.adjustedStart.clone();
177770
+ if (seg.end.isExactEqual(ev.point))
177771
+ return seg.adjustedEnd.clone();
177772
+ }
177773
+ }
177774
+ if (locations)
177775
+ for (const loc of locations)
177776
+ if (loc.point.isExactEqual(ev.point))
177777
+ return loc.adjustedPoint.clone();
177790
177778
  return ev.point;
177791
177779
  }
177792
177780
  /** Report distance between 2 points using current quantity formatter for length.
@@ -287698,7 +287686,7 @@ class TestContext {
287698
287686
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
287699
287687
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${(_a = process.env.IMJS_URL_PREFIX) !== null && _a !== void 0 ? _a : ""}api.bentley.com/imodels` } });
287700
287688
  await core_frontend_1.NoRenderApp.startup({
287701
- applicationVersion: "3.4.0-dev.35",
287689
+ applicationVersion: "3.4.0-dev.39",
287702
287690
  applicationId: this.settings.gprid,
287703
287691
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
287704
287692
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -287871,6 +287859,8 @@ __webpack_require__.r(__webpack_exports__);
287871
287859
  /* harmony export */ "VariableValueTypes": () => (/* reexport safe */ _presentation_common_RulesetVariables__WEBPACK_IMPORTED_MODULE_8__.VariableValueTypes),
287872
287860
  /* harmony export */ "addFieldHierarchy": () => (/* reexport safe */ _presentation_common_content_ContentTraverser__WEBPACK_IMPORTED_MODULE_29__.addFieldHierarchy),
287873
287861
  /* harmony export */ "applyOptionalPrefix": () => (/* reexport safe */ _presentation_common_content_ContentTraverser__WEBPACK_IMPORTED_MODULE_29__.applyOptionalPrefix),
287862
+ /* harmony export */ "combineDiagnosticsSeverities": () => (/* reexport safe */ _presentation_common_Diagnostics__WEBPACK_IMPORTED_MODULE_1__.combineDiagnosticsSeverities),
287863
+ /* harmony export */ "compareDiagnosticsSeverities": () => (/* reexport safe */ _presentation_common_Diagnostics__WEBPACK_IMPORTED_MODULE_1__.compareDiagnosticsSeverities),
287874
287864
  /* harmony export */ "createFieldHierarchies": () => (/* reexport safe */ _presentation_common_content_ContentTraverser__WEBPACK_IMPORTED_MODULE_29__.createFieldHierarchies),
287875
287865
  /* harmony export */ "getFieldByName": () => (/* reexport safe */ _presentation_common_content_Fields__WEBPACK_IMPORTED_MODULE_23__.getFieldByName),
287876
287866
  /* harmony export */ "getInstancesCount": () => (/* reexport safe */ _presentation_common_Utils__WEBPACK_IMPORTED_MODULE_11__.getInstancesCount),
@@ -288162,7 +288152,9 @@ var PresentationCommonLoggerCategory;
288162
288152
  "use strict";
288163
288153
  __webpack_require__.r(__webpack_exports__);
288164
288154
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
288165
- /* harmony export */ "DiagnosticsLogEntry": () => (/* binding */ DiagnosticsLogEntry)
288155
+ /* harmony export */ "DiagnosticsLogEntry": () => (/* binding */ DiagnosticsLogEntry),
288156
+ /* harmony export */ "combineDiagnosticsSeverities": () => (/* binding */ combineDiagnosticsSeverities),
288157
+ /* harmony export */ "compareDiagnosticsSeverities": () => (/* binding */ compareDiagnosticsSeverities)
288166
288158
  /* harmony export */ });
288167
288159
  /*---------------------------------------------------------------------------------------------
288168
288160
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
@@ -288171,6 +288163,51 @@ __webpack_require__.r(__webpack_exports__);
288171
288163
  /** @packageDocumentation
288172
288164
  * @module Core
288173
288165
  */
288166
+ /**
288167
+ * Returns lower severity of the given two. Examples:
288168
+ * ```
288169
+ * combineDiagnosticsSeverities("error", "error") === "error"
288170
+ * combineDiagnosticsSeverities("error", "debug") === "debug"
288171
+ * combineDiagnosticsSeverities("debug", "error") === "debug"
288172
+ * ```
288173
+ * @internal
288174
+ */
288175
+ function combineDiagnosticsSeverities(lhs, rhs) {
288176
+ if (!lhs && !rhs)
288177
+ return undefined;
288178
+ const combinedSeverity = (lhs === "trace" || rhs === "trace") ? "trace" :
288179
+ (lhs === "debug" || lhs === true || rhs === "debug" || rhs === true) ? "debug" :
288180
+ (lhs === "info" || rhs === "info") ? "info" :
288181
+ (lhs === "warning" || rhs === "warning") ? "warning" : "error";
288182
+ return combinedSeverity;
288183
+ }
288184
+ /**
288185
+ * Returns 0 if the given severities are equal after normalization, negative if `lhs` is lower, positive if higher. Examples:
288186
+ * ```
288187
+ * compareDiagnosticsSeverities("error", "error") === 0
288188
+ * compareDiagnosticsSeverities("error", false) === 0
288189
+ * compareDiagnosticsSeverities("error", undefined) === 0
288190
+ * compareDiagnosticsSeverities("debug", true) === 0
288191
+ * compareDiagnosticsSeverities("debug", "error") < 0
288192
+ * compareDiagnosticsSeverities("error", "debug") > 0
288193
+ * ```
288194
+ * @internal
288195
+ */
288196
+ function compareDiagnosticsSeverities(lhs, rhs) {
288197
+ const normalizedLhs = (lhs === undefined || lhs === false) ? "error" : lhs === true ? "debug" : lhs;
288198
+ const normalizedRhs = (rhs === undefined || rhs === false) ? "error" : rhs === true ? "debug" : rhs;
288199
+ if (normalizedLhs === normalizedRhs)
288200
+ return 0;
288201
+ if (normalizedLhs === "error")
288202
+ return 1;
288203
+ if (normalizedLhs === "warning")
288204
+ return normalizedRhs === "error" ? -1 : 1;
288205
+ if (normalizedLhs === "info")
288206
+ return normalizedRhs === "warning" || normalizedRhs === "error" ? -1 : 1;
288207
+ if (normalizedLhs === "debug")
288208
+ return normalizedRhs === "info" || normalizedRhs === "warning" || normalizedRhs === "error" ? -1 : 1;
288209
+ return -1;
288210
+ }
288174
288211
  /**
288175
288212
  * Functions related to diagnostics log entry.
288176
288213
  * @beta
@@ -306216,7 +306253,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
306216
306253
  /***/ ((module) => {
306217
306254
 
306218
306255
  "use strict";
306219
- module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.4.0-dev.35","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.35","@itwin/core-bentley":"workspace:^3.4.0-dev.35","@itwin/core-common":"workspace:^3.4.0-dev.35","@itwin/core-geometry":"workspace:^3.4.0-dev.35","@itwin/core-orbitgt":"workspace:^3.4.0-dev.35","@itwin/core-quantity":"workspace:^3.4.0-dev.35","@itwin/webgl-compatibility":"workspace:^3.4.0-dev.35"},"//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"}}]}}');
306256
+ 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"}}]}}');
306220
306257
 
306221
306258
  /***/ }),
306222
306259