@itwin/rpcinterface-full-stack-tests 5.1.0-dev.60 → 5.1.0-dev.62
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/backend/BackendInit.js.map +1 -1
- package/lib/common/Settings.js +12 -12
- package/lib/common/Settings.js.map +1 -1
- package/lib/common/SideChannels.js.map +1 -1
- package/lib/dist/bundled-tests.js +498 -263
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/frontend/DevToolsRpc.test.js.map +1 -1
- package/lib/frontend/Elements.test.js.map +1 -1
- package/lib/frontend/IModel.test.js.map +1 -1
- package/lib/frontend/IModelConnection.test.js.map +1 -1
- package/lib/frontend/Models.test.js.map +1 -1
- package/lib/frontend/PresentationRpc.test.js.map +1 -1
- package/lib/frontend/Views.test.js.map +1 -1
- package/lib/frontend/setup/IModelSession.js.map +1 -1
- package/lib/frontend/setup/TestContext.js.map +1 -1
- package/lib/frontend/workflows/BasicScenarios.test.js.map +1 -1
- package/package.json +17 -16
|
@@ -60476,6 +60476,7 @@ var PrimitiveTypeCode;
|
|
|
60476
60476
|
* @beta
|
|
60477
60477
|
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use the `Property` class from @itwin/ecschema-metadata` instead.
|
|
60478
60478
|
*/
|
|
60479
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
60479
60480
|
class PropertyMetaData {
|
|
60480
60481
|
primitiveType;
|
|
60481
60482
|
structName;
|
|
@@ -60561,6 +60562,7 @@ class PropertyMetaData {
|
|
|
60561
60562
|
* @beta
|
|
60562
60563
|
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `EntityClass` class from `@itwin/ecschema-metadata` instead.
|
|
60563
60564
|
*/
|
|
60565
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
60564
60566
|
class EntityMetaData {
|
|
60565
60567
|
/** The Id of the class in the [[IModelDb]] from which the metadata was obtained. */
|
|
60566
60568
|
classId;
|
|
@@ -72821,8 +72823,7 @@ class WhiteOnWhiteReversalSettings {
|
|
|
72821
72823
|
"use strict";
|
|
72822
72824
|
__webpack_require__.r(__webpack_exports__);
|
|
72823
72825
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
72824
|
-
/* harmony export */ TextAnnotation: () => (/* binding */ TextAnnotation)
|
|
72825
|
-
/* harmony export */ textAnnotationFrameShapes: () => (/* binding */ textAnnotationFrameShapes)
|
|
72826
|
+
/* harmony export */ TextAnnotation: () => (/* binding */ TextAnnotation)
|
|
72826
72827
|
/* harmony export */ });
|
|
72827
72828
|
/* harmony import */ var _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-geometry */ "../../core/geometry/lib/esm/core-geometry.js");
|
|
72828
72829
|
/* harmony import */ var _TextBlock__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TextBlock */ "../../core/common/lib/esm/annotation/TextBlock.js");
|
|
@@ -72835,10 +72836,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
72835
72836
|
*/
|
|
72836
72837
|
|
|
72837
72838
|
|
|
72838
|
-
/** Set of predefined shapes that can be computed and drawn around the margins of a [[TextBlock]]
|
|
72839
|
-
* @beta
|
|
72840
|
-
*/
|
|
72841
|
-
const textAnnotationFrameShapes = ["none", "line", "rectangle", "circle", "equilateralTriangle", "diamond", "square", "pentagon", "hexagon", "octagon", "capsule", "roundedRectangle"];
|
|
72842
72839
|
/**
|
|
72843
72840
|
* Represents a formatted block of text positioned in 2d or 3d space.
|
|
72844
72841
|
* [TextAnnotation2d]($backend) and [TextAnnotation3d]($backend) elements store a single TextAnnotation from which their geometric representation is generated.
|
|
@@ -72863,16 +72860,13 @@ class TextAnnotation {
|
|
|
72863
72860
|
anchor;
|
|
72864
72861
|
/** An offset applied to the anchor point that can be used to position annotations within the same geometry stream relative to one another. */
|
|
72865
72862
|
offset;
|
|
72866
|
-
/** The frame settings of the text annotation. */
|
|
72867
|
-
frame;
|
|
72868
72863
|
/** The leaders of the text annotation. */
|
|
72869
72864
|
leaders;
|
|
72870
|
-
constructor(offset, angles, textBlock, anchor,
|
|
72865
|
+
constructor(offset, angles, textBlock, anchor, leaders) {
|
|
72871
72866
|
this.offset = offset;
|
|
72872
72867
|
this.orientation = angles;
|
|
72873
72868
|
this.textBlock = textBlock;
|
|
72874
72869
|
this.anchor = anchor;
|
|
72875
|
-
this.frame = frame;
|
|
72876
72870
|
this.leaders = leaders;
|
|
72877
72871
|
}
|
|
72878
72872
|
/** Creates a new TextAnnotation. */
|
|
@@ -72881,11 +72875,8 @@ class TextAnnotation {
|
|
|
72881
72875
|
const angles = args?.orientation ?? new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.YawPitchRollAngles();
|
|
72882
72876
|
const textBlock = args?.textBlock ?? _TextBlock__WEBPACK_IMPORTED_MODULE_1__.TextBlock.createEmpty();
|
|
72883
72877
|
const anchor = args?.anchor ?? { vertical: "top", horizontal: "left" };
|
|
72884
|
-
// If the user supplies a frame, but doesn't supply a shape, default the shape to "rectangle"
|
|
72885
|
-
const shape = args?.frame?.shape ?? "rectangle";
|
|
72886
|
-
const frame = args?.frame ? { shape, ...args.frame } : undefined;
|
|
72887
72878
|
const leaders = args?.leaders ?? undefined;
|
|
72888
|
-
return new TextAnnotation(offset, angles, textBlock, anchor,
|
|
72879
|
+
return new TextAnnotation(offset, angles, textBlock, anchor, leaders);
|
|
72889
72880
|
}
|
|
72890
72881
|
/**
|
|
72891
72882
|
* Creates a new TextAnnotation instance from its JSON representation.
|
|
@@ -72896,7 +72887,6 @@ class TextAnnotation {
|
|
|
72896
72887
|
orientation: props?.orientation ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.YawPitchRollAngles.fromJSON(props.orientation) : undefined,
|
|
72897
72888
|
textBlock: props?.textBlock ? _TextBlock__WEBPACK_IMPORTED_MODULE_1__.TextBlock.create(props.textBlock) : undefined,
|
|
72898
72889
|
anchor: props?.anchor ? { ...props.anchor } : undefined,
|
|
72899
|
-
frame: props?.frame ? { shape: "rectangle", ...props.frame } : undefined,
|
|
72900
72890
|
leaders: props?.leaders ? props.leaders.map((leader) => ({
|
|
72901
72891
|
startPoint: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Point3d.fromJSON(leader.startPoint),
|
|
72902
72892
|
attachment: leader.attachment,
|
|
@@ -72910,7 +72900,7 @@ class TextAnnotation {
|
|
|
72910
72900
|
*/
|
|
72911
72901
|
toJSON() {
|
|
72912
72902
|
const props = {};
|
|
72913
|
-
// Even if the text block is empty, we want to record its style
|
|
72903
|
+
// Even if the text block is empty, we want to record its style ID and overrides, e.g.,
|
|
72914
72904
|
// so the user can pick up where they left off editing it next time.
|
|
72915
72905
|
props.textBlock = this.textBlock.toJSON();
|
|
72916
72906
|
if (!this.offset.isZero) {
|
|
@@ -72922,8 +72912,6 @@ class TextAnnotation {
|
|
|
72922
72912
|
if (this.anchor.vertical !== "top" || this.anchor.horizontal !== "left") {
|
|
72923
72913
|
props.anchor = { ...this.anchor };
|
|
72924
72914
|
}
|
|
72925
|
-
// Default frame to "none"
|
|
72926
|
-
props.frame = this.frame ? { ...this.frame } : undefined;
|
|
72927
72915
|
props.leaders = this.leaders?.map((leader) => ({
|
|
72928
72916
|
startPoint: leader.startPoint.toJSON(),
|
|
72929
72917
|
attachment: leader.attachment,
|
|
@@ -72937,16 +72925,23 @@ class TextAnnotation {
|
|
|
72937
72925
|
* at the bottom left, then the transform will be relative to the bottom-left corner of `textBlockExtents`.
|
|
72938
72926
|
* The text block will be rotated around the fixed anchor point according to [[orientation]], then translated by [[offset]].
|
|
72939
72927
|
* The anchor point will coincide with (0, 0, 0) unless an [[offset]] is present.
|
|
72928
|
+
* If a scale factor is specified, the transform will also scale the annotation by that factor. Usually, this should come from the [[Drawing]] containing the annotation.
|
|
72940
72929
|
* @param boundingBox A box fully containing the [[textBlock]]. This range should include the margins.
|
|
72930
|
+
* @param scaleFactor A factor by which to scale the annotation. Default: 1 (no scaling).
|
|
72941
72931
|
* @see [[computeAnchorPoint]] to compute the transform's anchor point.
|
|
72942
72932
|
* @see [computeLayoutTextBlockResult]($backend) to lay out a `TextBlock`.
|
|
72943
72933
|
*/
|
|
72944
|
-
computeTransform(boundingBox) {
|
|
72934
|
+
computeTransform(boundingBox, scaleFactor = 1) {
|
|
72945
72935
|
const anchorPt = this.computeAnchorPoint(boundingBox);
|
|
72946
72936
|
const matrix = this.orientation.toMatrix3d();
|
|
72947
|
-
const
|
|
72937
|
+
const transform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createIdentity();
|
|
72948
72938
|
const translation = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createTranslation(this.offset.minus(anchorPt));
|
|
72949
|
-
|
|
72939
|
+
const scaleTransform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createScaleAboutPoint(anchorPt, scaleFactor);
|
|
72940
|
+
const rotation = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createFixedPointAndMatrix(anchorPt, matrix);
|
|
72941
|
+
transform.multiplyTransformTransform(translation, transform);
|
|
72942
|
+
transform.multiplyTransformTransform(scaleTransform, transform);
|
|
72943
|
+
transform.multiplyTransformTransform(rotation, transform);
|
|
72944
|
+
return transform;
|
|
72950
72945
|
}
|
|
72951
72946
|
/** Compute the anchor point of this annotation as specified by [[anchor]].
|
|
72952
72947
|
* @param boundingBox A box fully containing the [[textBlock]].
|
|
@@ -73007,12 +73002,6 @@ class TextAnnotation {
|
|
|
73007
73002
|
!this.offset.isAlmostEqual(other.offset) ||
|
|
73008
73003
|
!this.textBlock.equals(other.textBlock))
|
|
73009
73004
|
return false;
|
|
73010
|
-
const framesMatch = this.frame?.shape === other.frame?.shape
|
|
73011
|
-
&& this.frame?.fill === other.frame?.fill
|
|
73012
|
-
&& this.frame?.border === other.frame?.border
|
|
73013
|
-
&& this.frame?.borderWeight === other.frame?.borderWeight;
|
|
73014
|
-
if (!framesMatch)
|
|
73015
|
-
return false;
|
|
73016
73005
|
return this.areLeadersEqual(this.leaders, other.leaders);
|
|
73017
73006
|
}
|
|
73018
73007
|
}
|
|
@@ -73038,6 +73027,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
73038
73027
|
/* harmony export */ TextBlockComponent: () => (/* binding */ TextBlockComponent),
|
|
73039
73028
|
/* harmony export */ TextRun: () => (/* binding */ TextRun)
|
|
73040
73029
|
/* harmony export */ });
|
|
73030
|
+
/* harmony import */ var _TextStyle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TextStyle */ "../../core/common/lib/esm/annotation/TextStyle.js");
|
|
73041
73031
|
/*---------------------------------------------------------------------------------------------
|
|
73042
73032
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
73043
73033
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -73045,29 +73035,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
73045
73035
|
/** @packageDocumentation
|
|
73046
73036
|
* @module Annotation
|
|
73047
73037
|
*/
|
|
73038
|
+
|
|
73048
73039
|
/** Abstract representation of any of the building blocks that make up a [[TextBlock]] document - namely [[Run]]s, [[Paragraph]]s, and [[TextBlock]] itself.
|
|
73049
|
-
*
|
|
73040
|
+
* The [[TextBlock]] can specify an [AnnotationTextStyle]($backend) that formats its contents. Each component can specify an optional [[styleOverrides]] to customize that formatting.
|
|
73050
73041
|
* @beta
|
|
73051
73042
|
*/
|
|
73052
73043
|
class TextBlockComponent {
|
|
73053
|
-
_styleName;
|
|
73054
73044
|
_styleOverrides;
|
|
73055
73045
|
/** @internal */
|
|
73056
73046
|
constructor(props) {
|
|
73057
|
-
this.
|
|
73058
|
-
this._styleOverrides = { ...props.styleOverrides };
|
|
73059
|
-
}
|
|
73060
|
-
/** The name of the [[TextStyle]] that provides the base formatting for the contents of this component.
|
|
73061
|
-
* @note Assigning to this property is equivalent to calling [[applyStyle]] with default [[ApplyTextStyleOptions]], which propagates the style change to all of
|
|
73062
|
-
* the components sub-components and clears any [[styleOverrides]].
|
|
73063
|
-
*/
|
|
73064
|
-
get styleName() {
|
|
73065
|
-
return this._styleName;
|
|
73066
|
-
}
|
|
73067
|
-
set styleName(styleName) {
|
|
73068
|
-
this.applyStyle(styleName);
|
|
73047
|
+
this._styleOverrides = _TextStyle__WEBPACK_IMPORTED_MODULE_0__.TextStyleSettings.cloneProps(props?.styleOverrides ?? {});
|
|
73069
73048
|
}
|
|
73070
|
-
/** Deviations in individual properties of the [[
|
|
73049
|
+
/** Deviations in individual properties of the [[TextStyleSettings]] in the [AnnotationTextStyle]($backend) specified by `styleId` on the [[TextBlock]].
|
|
73071
73050
|
* For example, if the style uses the "Arial" font, you can override that by settings `styleOverrides.fontName` to "Comic Sans".
|
|
73072
73051
|
* @see [[clearStyleOverrides]] to reset this to an empty object.
|
|
73073
73052
|
*/
|
|
@@ -73075,20 +73054,13 @@ class TextBlockComponent {
|
|
|
73075
73054
|
return this._styleOverrides;
|
|
73076
73055
|
}
|
|
73077
73056
|
set styleOverrides(overrides) {
|
|
73078
|
-
this._styleOverrides =
|
|
73057
|
+
this._styleOverrides = _TextStyle__WEBPACK_IMPORTED_MODULE_0__.TextStyleSettings.cloneProps(overrides);
|
|
73079
73058
|
}
|
|
73080
|
-
/** Reset any [[styleOverrides]] applied to this component
|
|
73081
|
-
clearStyleOverrides() {
|
|
73059
|
+
/** Reset any [[styleOverrides]] applied to this component. */
|
|
73060
|
+
clearStyleOverrides(_options) {
|
|
73082
73061
|
this.styleOverrides = {};
|
|
73083
73062
|
}
|
|
73084
|
-
/**
|
|
73085
|
-
applyStyle(styleName, options) {
|
|
73086
|
-
this._styleName = styleName;
|
|
73087
|
-
if (!(options?.preserveOverrides)) {
|
|
73088
|
-
this.clearStyleOverrides();
|
|
73089
|
-
}
|
|
73090
|
-
}
|
|
73091
|
-
/** Returns true if [[styleOverrides]] specifies any deviations from this component's base [[TextStyle]]. */
|
|
73063
|
+
/** Returns true if [[styleOverrides]] specifies any deviations from the [[TextBlock]]'s [AnnotationTextStyle]($backend). */
|
|
73092
73064
|
get overridesStyle() {
|
|
73093
73065
|
return Object.keys(this.styleOverrides).length > 0;
|
|
73094
73066
|
}
|
|
@@ -73103,15 +73075,14 @@ class TextBlockComponent {
|
|
|
73103
73075
|
/** Convert this component to its JSON representation. */
|
|
73104
73076
|
toJSON() {
|
|
73105
73077
|
return {
|
|
73106
|
-
|
|
73107
|
-
styleOverrides: { ...this.styleOverrides },
|
|
73078
|
+
styleOverrides: _TextStyle__WEBPACK_IMPORTED_MODULE_0__.TextStyleSettings.cloneProps(this.styleOverrides),
|
|
73108
73079
|
};
|
|
73109
73080
|
}
|
|
73110
73081
|
/** Returns true if `this` is equivalent to `other`. */
|
|
73111
73082
|
equals(other) {
|
|
73112
73083
|
const myKeys = Object.keys(this.styleOverrides);
|
|
73113
73084
|
const yrKeys = Object.keys(other._styleOverrides);
|
|
73114
|
-
if (
|
|
73085
|
+
if (myKeys.length !== yrKeys.length) {
|
|
73115
73086
|
return false;
|
|
73116
73087
|
}
|
|
73117
73088
|
for (const name of myKeys) {
|
|
@@ -73155,8 +73126,8 @@ class TextRun extends TextBlockComponent {
|
|
|
73155
73126
|
baselineShift;
|
|
73156
73127
|
constructor(props) {
|
|
73157
73128
|
super(props);
|
|
73158
|
-
this.content = props
|
|
73159
|
-
this.baselineShift = props
|
|
73129
|
+
this.content = props?.content ?? "";
|
|
73130
|
+
this.baselineShift = props?.baselineShift ?? "none";
|
|
73160
73131
|
}
|
|
73161
73132
|
clone() {
|
|
73162
73133
|
return new TextRun(this.toJSON());
|
|
@@ -73193,8 +73164,8 @@ class FractionRun extends TextBlockComponent {
|
|
|
73193
73164
|
denominator;
|
|
73194
73165
|
constructor(props) {
|
|
73195
73166
|
super(props);
|
|
73196
|
-
this.numerator = props
|
|
73197
|
-
this.denominator = props
|
|
73167
|
+
this.numerator = props?.numerator ?? "";
|
|
73168
|
+
this.denominator = props?.denominator ?? "";
|
|
73198
73169
|
}
|
|
73199
73170
|
toJSON() {
|
|
73200
73171
|
return {
|
|
@@ -73290,7 +73261,7 @@ class Paragraph extends TextBlockComponent {
|
|
|
73290
73261
|
runs;
|
|
73291
73262
|
constructor(props) {
|
|
73292
73263
|
super(props);
|
|
73293
|
-
this.runs = props
|
|
73264
|
+
this.runs = props?.runs?.map((run) => Run.fromJSON(run)) ?? [];
|
|
73294
73265
|
}
|
|
73295
73266
|
toJSON() {
|
|
73296
73267
|
return {
|
|
@@ -73305,13 +73276,16 @@ class Paragraph extends TextBlockComponent {
|
|
|
73305
73276
|
clone() {
|
|
73306
73277
|
return new Paragraph(this.toJSON());
|
|
73307
73278
|
}
|
|
73308
|
-
/**
|
|
73309
|
-
|
|
73310
|
-
|
|
73311
|
-
|
|
73312
|
-
|
|
73313
|
-
|
|
73314
|
-
|
|
73279
|
+
/**
|
|
73280
|
+
* Clears any [[styleOverrides]] applied to this Paragraph.
|
|
73281
|
+
* Will also clear [[styleOverrides]] from all child components unless [[ClearTextStyleOptions.preserveChildrenOverrides]] is `true`.
|
|
73282
|
+
*/
|
|
73283
|
+
clearStyleOverrides(options) {
|
|
73284
|
+
super.clearStyleOverrides();
|
|
73285
|
+
if (options?.preserveChildrenOverrides)
|
|
73286
|
+
return;
|
|
73287
|
+
for (const run of this.runs) {
|
|
73288
|
+
run.clearStyleOverrides();
|
|
73315
73289
|
}
|
|
73316
73290
|
}
|
|
73317
73291
|
/** Compute a string representation of this paragraph by concatenating the string representations of all of its [[runs]]. */
|
|
@@ -73336,6 +73310,11 @@ class Paragraph extends TextBlockComponent {
|
|
|
73336
73310
|
* @beta
|
|
73337
73311
|
*/
|
|
73338
73312
|
class TextBlock extends TextBlockComponent {
|
|
73313
|
+
/** The ID of the [AnnotationTextStyle]($backend) that provides the base formatting for the contents of this TextBlock.
|
|
73314
|
+
* @note Assigning to this property retains all style overrides on the TextBlock and its child components.
|
|
73315
|
+
* Call [[clearStyleOverrides]] to clear the TextBlock's and optionally all children's style overrides.
|
|
73316
|
+
*/
|
|
73317
|
+
styleId;
|
|
73339
73318
|
/** The width of the document in meters. Lines that would exceed this width are instead wrapped around to the next line if possible.
|
|
73340
73319
|
* A value less than or equal to zero indicates no wrapping is to be applied.
|
|
73341
73320
|
* Default: 0
|
|
@@ -73349,6 +73328,7 @@ class TextBlock extends TextBlockComponent {
|
|
|
73349
73328
|
paragraphs;
|
|
73350
73329
|
constructor(props) {
|
|
73351
73330
|
super(props);
|
|
73331
|
+
this.styleId = props.styleId;
|
|
73352
73332
|
this.width = props.width ?? 0;
|
|
73353
73333
|
this.justification = props.justification ?? "left";
|
|
73354
73334
|
// Assign default margins if not provided
|
|
@@ -73363,6 +73343,7 @@ class TextBlock extends TextBlockComponent {
|
|
|
73363
73343
|
toJSON() {
|
|
73364
73344
|
return {
|
|
73365
73345
|
...super.toJSON(),
|
|
73346
|
+
styleId: this.styleId,
|
|
73366
73347
|
width: this.width,
|
|
73367
73348
|
justification: this.justification,
|
|
73368
73349
|
margins: this.margins,
|
|
@@ -73373,9 +73354,9 @@ class TextBlock extends TextBlockComponent {
|
|
|
73373
73354
|
static create(props) {
|
|
73374
73355
|
return new TextBlock(props);
|
|
73375
73356
|
}
|
|
73376
|
-
/** Create an empty text block containing no [[paragraphs]] and an empty [[
|
|
73357
|
+
/** Create an empty text block containing no [[paragraphs]] and an empty [[styleId]]. */
|
|
73377
73358
|
static createEmpty() {
|
|
73378
|
-
return TextBlock.create({
|
|
73359
|
+
return TextBlock.create({ styleId: "" });
|
|
73379
73360
|
}
|
|
73380
73361
|
/** Returns true if every paragraph in this text block is empty. */
|
|
73381
73362
|
get isEmpty() {
|
|
@@ -73384,13 +73365,16 @@ class TextBlock extends TextBlockComponent {
|
|
|
73384
73365
|
clone() {
|
|
73385
73366
|
return new TextBlock(this.toJSON());
|
|
73386
73367
|
}
|
|
73387
|
-
/**
|
|
73388
|
-
|
|
73389
|
-
|
|
73390
|
-
|
|
73391
|
-
|
|
73392
|
-
|
|
73393
|
-
|
|
73368
|
+
/**
|
|
73369
|
+
* Clears any [[styleOverrides]] applied to this TextBlock.
|
|
73370
|
+
* Will also clear [[styleOverrides]] from all child components unless [[ClearTextStyleOptions.preserveChildrenOverrides]] is `true`.
|
|
73371
|
+
*/
|
|
73372
|
+
clearStyleOverrides(options) {
|
|
73373
|
+
super.clearStyleOverrides();
|
|
73374
|
+
if (options?.preserveChildrenOverrides)
|
|
73375
|
+
return;
|
|
73376
|
+
for (const paragraph of this.paragraphs) {
|
|
73377
|
+
paragraph.clearStyleOverrides();
|
|
73394
73378
|
}
|
|
73395
73379
|
}
|
|
73396
73380
|
/** Compute a string representation of the document's contents by concatenating the string representations of each of its [[paragraphs]], separated by [[TextBlockStringifyOptions.paragraphBreak]]. */
|
|
@@ -73398,14 +73382,17 @@ class TextBlock extends TextBlockComponent {
|
|
|
73398
73382
|
return this.paragraphs.map((x) => x.stringify(options)).join(options?.paragraphBreak ?? " ");
|
|
73399
73383
|
}
|
|
73400
73384
|
/** Add and return a new paragraph.
|
|
73401
|
-
*
|
|
73402
|
-
* the paragraph will inherit
|
|
73385
|
+
* By default, the paragraph will be created with no [[styleOverrides]], so that it inherits the style of this block.
|
|
73386
|
+
* @param seedFromLast If true and [[paragraphs]] is not empty, the new paragraph will inherit the style overrides of the last [[Paragraph]] in this block.
|
|
73403
73387
|
*/
|
|
73404
|
-
appendParagraph() {
|
|
73405
|
-
|
|
73388
|
+
appendParagraph(seedFromLast = false) {
|
|
73389
|
+
let styleOverrides = {};
|
|
73390
|
+
if (seedFromLast && this.paragraphs.length > 0) {
|
|
73391
|
+
const seed = this.paragraphs[this.paragraphs.length - 1];
|
|
73392
|
+
styleOverrides = { ...seed.styleOverrides };
|
|
73393
|
+
}
|
|
73406
73394
|
const paragraph = Paragraph.create({
|
|
73407
|
-
|
|
73408
|
-
styleOverrides: seed?.styleOverrides ?? undefined,
|
|
73395
|
+
styleOverrides
|
|
73409
73396
|
});
|
|
73410
73397
|
this.paragraphs.push(paragraph);
|
|
73411
73398
|
return paragraph;
|
|
@@ -73421,6 +73408,9 @@ class TextBlock extends TextBlockComponent {
|
|
|
73421
73408
|
if (!(other instanceof TextBlock)) {
|
|
73422
73409
|
return false;
|
|
73423
73410
|
}
|
|
73411
|
+
if (this.styleId !== other.styleId || !super.equals(other)) {
|
|
73412
|
+
return false;
|
|
73413
|
+
}
|
|
73424
73414
|
if (this.width !== other.width || this.justification !== other.justification || this.paragraphs.length !== other.paragraphs.length) {
|
|
73425
73415
|
return false;
|
|
73426
73416
|
}
|
|
@@ -73483,9 +73473,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
73483
73473
|
"use strict";
|
|
73484
73474
|
__webpack_require__.r(__webpack_exports__);
|
|
73485
73475
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
73486
|
-
/* harmony export */
|
|
73487
|
-
/* harmony export */
|
|
73476
|
+
/* harmony export */ TextStyleSettings: () => (/* binding */ TextStyleSettings),
|
|
73477
|
+
/* harmony export */ textAnnotationFrameShapes: () => (/* binding */ textAnnotationFrameShapes)
|
|
73488
73478
|
/* harmony export */ });
|
|
73479
|
+
/* harmony import */ var _ColorDef__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ColorDef */ "../../core/common/lib/esm/ColorDef.js");
|
|
73489
73480
|
/*---------------------------------------------------------------------------------------------
|
|
73490
73481
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
73491
73482
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -73493,8 +73484,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
73493
73484
|
/** @packageDocumentation
|
|
73494
73485
|
* @module Annotation
|
|
73495
73486
|
*/
|
|
73487
|
+
|
|
73488
|
+
/** Set of predefined shapes that can be computed and drawn around the margins of a [[TextBlock]]
|
|
73489
|
+
* @beta
|
|
73490
|
+
*/
|
|
73491
|
+
const textAnnotationFrameShapes = ["none", "line", "rectangle", "circle", "equilateralTriangle", "diamond", "square", "pentagon", "hexagon", "octagon", "capsule", "roundedRectangle"];
|
|
73492
|
+
;
|
|
73493
|
+
function deepFreeze(obj) {
|
|
73494
|
+
if (obj === null || typeof obj !== "object" || Object.isFrozen(obj))
|
|
73495
|
+
return;
|
|
73496
|
+
Object.getOwnPropertyNames(obj).forEach((prop) => {
|
|
73497
|
+
const value = obj[prop];
|
|
73498
|
+
if (value && typeof value === "object") {
|
|
73499
|
+
deepFreeze(value);
|
|
73500
|
+
}
|
|
73501
|
+
});
|
|
73502
|
+
Object.freeze(obj);
|
|
73503
|
+
}
|
|
73496
73504
|
/** A description of the formatting to be applied to a [[TextBlockComponent]].
|
|
73497
|
-
* Named instances of these settings can be stored as [
|
|
73505
|
+
* Named instances of these settings can be stored as [AnnotationTextStyle]($backend)s in an iModel.
|
|
73498
73506
|
* @note This is an immutable type. Use [[clone]] to create a modified copy.
|
|
73499
73507
|
* @see [[TextStyleSettingsProps]] for documentation of each of the settings.
|
|
73500
73508
|
* @beta
|
|
@@ -73502,7 +73510,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
73502
73510
|
class TextStyleSettings {
|
|
73503
73511
|
/** The color of the text. */
|
|
73504
73512
|
color;
|
|
73505
|
-
/** The name of a font stored in
|
|
73513
|
+
/** The name of a font stored in an iModel, used to draw the contents of a [[TextRun]].
|
|
73506
73514
|
*/
|
|
73507
73515
|
fontName;
|
|
73508
73516
|
/** The height each line of text, in meters. Many other settings use the line height as the basis for computing their own values.
|
|
@@ -73552,7 +73560,9 @@ class TextStyleSettings {
|
|
|
73552
73560
|
* These are equally spaced from the left edge of the TextBlock. Default is 4 meters.
|
|
73553
73561
|
*/
|
|
73554
73562
|
tabInterval;
|
|
73555
|
-
/**
|
|
73563
|
+
/** The frame settings of the [[TextAnnotation]]. */
|
|
73564
|
+
frame;
|
|
73565
|
+
/** A fully-populated JSON representation of the default settings. A real `fontName` must be provided before use. */
|
|
73556
73566
|
static defaultProps = {
|
|
73557
73567
|
color: "subcategory",
|
|
73558
73568
|
fontName: "",
|
|
@@ -73569,13 +73579,19 @@ class TextStyleSettings {
|
|
|
73569
73579
|
superScriptScale: 2 / 3,
|
|
73570
73580
|
widthFactor: 1,
|
|
73571
73581
|
leader: {
|
|
73572
|
-
color: "
|
|
73582
|
+
color: "inherit",
|
|
73573
73583
|
wantElbow: false,
|
|
73574
73584
|
elbowLength: 1.0,
|
|
73575
73585
|
terminatorHeightFactor: 1.0,
|
|
73576
73586
|
terminatorWidthFactor: 1.0,
|
|
73577
73587
|
},
|
|
73578
73588
|
tabInterval: 4,
|
|
73589
|
+
frame: {
|
|
73590
|
+
shape: "none",
|
|
73591
|
+
fill: "none",
|
|
73592
|
+
border: _ColorDef__WEBPACK_IMPORTED_MODULE_0__.ColorDef.black.toJSON(),
|
|
73593
|
+
borderWeight: 1,
|
|
73594
|
+
},
|
|
73579
73595
|
};
|
|
73580
73596
|
/** Settings initialized to all default values. */
|
|
73581
73597
|
static defaults = new TextStyleSettings({});
|
|
@@ -73606,11 +73622,30 @@ class TextStyleSettings {
|
|
|
73606
73622
|
};
|
|
73607
73623
|
this.leader = Object.freeze(leader);
|
|
73608
73624
|
this.tabInterval = props.tabInterval ?? defaults.tabInterval;
|
|
73625
|
+
const frame = {
|
|
73626
|
+
shape: props.frame?.shape ?? defaults.frame.shape,
|
|
73627
|
+
fill: props.frame?.fill ?? defaults.frame.fill,
|
|
73628
|
+
border: props.frame?.border ?? defaults.frame.border,
|
|
73629
|
+
borderWeight: props.frame?.borderWeight ?? defaults.frame.borderWeight,
|
|
73630
|
+
};
|
|
73631
|
+
// Cast to indicate to TypeScript that the frame properties are all defined
|
|
73632
|
+
this.frame = Object.freeze(frame);
|
|
73609
73633
|
}
|
|
73610
73634
|
/** Create a copy of these settings, modified according to the properties defined by `alteredProps`. */
|
|
73611
73635
|
clone(alteredProps) {
|
|
73612
73636
|
return alteredProps ? new TextStyleSettings(alteredProps, this) : this;
|
|
73613
73637
|
}
|
|
73638
|
+
/** Creates a deep copy of the `TextStyleSettingsProps`. */
|
|
73639
|
+
static cloneProps(props) {
|
|
73640
|
+
const copy = { ...props };
|
|
73641
|
+
if (props.leader) {
|
|
73642
|
+
copy.leader = { ...props.leader };
|
|
73643
|
+
}
|
|
73644
|
+
if (props.frame) {
|
|
73645
|
+
copy.frame = { ...props.frame };
|
|
73646
|
+
}
|
|
73647
|
+
return copy;
|
|
73648
|
+
}
|
|
73614
73649
|
/** Create settings from their JSON representation. */
|
|
73615
73650
|
static fromJSON(props) {
|
|
73616
73651
|
return props ? new TextStyleSettings(props) : TextStyleSettings.defaults;
|
|
@@ -73627,47 +73662,49 @@ class TextStyleSettings {
|
|
|
73627
73662
|
&& this.leader.elbowLength === other.elbowLength && this.leader.terminatorHeightFactor === other.terminatorHeightFactor
|
|
73628
73663
|
&& this.leader.terminatorWidthFactor === other.terminatorWidthFactor;
|
|
73629
73664
|
}
|
|
73665
|
+
frameEquals(other) {
|
|
73666
|
+
return this.frame?.shape === other.shape
|
|
73667
|
+
&& this.frame?.fill === other.fill
|
|
73668
|
+
&& this.frame?.border === other.border
|
|
73669
|
+
&& this.frame?.borderWeight === other.borderWeight;
|
|
73670
|
+
}
|
|
73630
73671
|
equals(other) {
|
|
73631
73672
|
return this.color === other.color && this.fontName === other.fontName
|
|
73632
73673
|
&& this.lineHeight === other.lineHeight && this.lineSpacingFactor === other.lineSpacingFactor && this.widthFactor === other.widthFactor
|
|
73633
73674
|
&& this.isBold === other.isBold && this.isItalic === other.isItalic && this.isUnderlined === other.isUnderlined
|
|
73634
73675
|
&& this.stackedFractionType === other.stackedFractionType && this.stackedFractionScale === other.stackedFractionScale
|
|
73635
73676
|
&& this.subScriptOffsetFactor === other.subScriptOffsetFactor && this.subScriptScale === other.subScriptScale
|
|
73636
|
-
&& this.superScriptOffsetFactor === other.superScriptOffsetFactor
|
|
73637
|
-
&& this.
|
|
73638
|
-
&& this.
|
|
73639
|
-
|
|
73640
|
-
}
|
|
73641
|
-
Object.freeze(TextStyleSettings.defaultProps);
|
|
73642
|
-
Object.freeze(TextStyleSettings.defaults);
|
|
73643
|
-
/** A named, immutable [[TextStyleSettings]] stored in a [Workspace]($backend).
|
|
73644
|
-
* @see [[TextBlockComponent.styleName]] to define the text style for a component of a [[TextBlock]].
|
|
73645
|
-
* @note This is an immutable type. Use [[clone]] to create a modified copy.
|
|
73646
|
-
* @beta
|
|
73647
|
-
*/
|
|
73648
|
-
class TextStyle {
|
|
73649
|
-
name;
|
|
73650
|
-
settings;
|
|
73651
|
-
constructor(name, settings) {
|
|
73652
|
-
this.name = name;
|
|
73653
|
-
this.settings = settings;
|
|
73654
|
-
}
|
|
73655
|
-
/** Create a style from its JSON representation. */
|
|
73656
|
-
static fromJSON(json) {
|
|
73657
|
-
return TextStyle.create(json.name, TextStyleSettings.fromJSON(json.settings));
|
|
73658
|
-
}
|
|
73659
|
-
/** Create a new style. */
|
|
73660
|
-
static create(name, settings) {
|
|
73661
|
-
return new TextStyle(name, settings);
|
|
73677
|
+
&& this.superScriptOffsetFactor === other.superScriptOffsetFactor && this.superScriptScale === other.superScriptScale
|
|
73678
|
+
&& this.tabInterval === other.tabInterval
|
|
73679
|
+
&& this.leaderEquals(other.leader)
|
|
73680
|
+
&& this.frameEquals(other.frame);
|
|
73662
73681
|
}
|
|
73663
|
-
/**
|
|
73664
|
-
|
|
73665
|
-
|
|
73666
|
-
|
|
73667
|
-
|
|
73668
|
-
|
|
73682
|
+
/**
|
|
73683
|
+
* Returns a list of validation errors for this instance.
|
|
73684
|
+
*
|
|
73685
|
+
* A TextStyleSettings object may contain values that are invalid in all contexts.
|
|
73686
|
+
* If this method returns any error strings, using the settings will likely result in rendering failures or runtime exceptions.
|
|
73687
|
+
*
|
|
73688
|
+
* This method only checks for universally invalid values. Additional domain-specific validation may be required depending on the context in which these settings are used.
|
|
73689
|
+
*
|
|
73690
|
+
* @returns An array of error strings describing the invalid values, or an empty array if the settings are valid.
|
|
73691
|
+
*/
|
|
73692
|
+
getValidationErrors() {
|
|
73693
|
+
const errorMessages = [];
|
|
73694
|
+
if (this.fontName.trim() === "") {
|
|
73695
|
+
errorMessages.push("fontName must be provided");
|
|
73696
|
+
}
|
|
73697
|
+
if (this.lineHeight <= 0) {
|
|
73698
|
+
errorMessages.push("lineHeight must be greater than 0");
|
|
73699
|
+
}
|
|
73700
|
+
if (this.stackedFractionScale <= 0) {
|
|
73701
|
+
errorMessages.push("stackedFractionScale must be greater than 0");
|
|
73702
|
+
}
|
|
73703
|
+
return errorMessages;
|
|
73669
73704
|
}
|
|
73670
73705
|
}
|
|
73706
|
+
deepFreeze(TextStyleSettings.defaultProps);
|
|
73707
|
+
deepFreeze(TextStyleSettings.defaults);
|
|
73671
73708
|
|
|
73672
73709
|
|
|
73673
73710
|
/***/ }),
|
|
@@ -74000,7 +74037,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
74000
74037
|
/* harmony export */ TextBlockComponent: () => (/* reexport safe */ _annotation_TextBlock__WEBPACK_IMPORTED_MODULE_3__.TextBlockComponent),
|
|
74001
74038
|
/* harmony export */ TextRun: () => (/* reexport safe */ _annotation_TextBlock__WEBPACK_IMPORTED_MODULE_3__.TextRun),
|
|
74002
74039
|
/* harmony export */ TextString: () => (/* reexport safe */ _geometry_TextString__WEBPACK_IMPORTED_MODULE_56__.TextString),
|
|
74003
|
-
/* harmony export */ TextStyle: () => (/* reexport safe */ _annotation_TextStyle__WEBPACK_IMPORTED_MODULE_6__.TextStyle),
|
|
74004
74040
|
/* harmony export */ TextStyleSettings: () => (/* reexport safe */ _annotation_TextStyle__WEBPACK_IMPORTED_MODULE_6__.TextStyleSettings),
|
|
74005
74041
|
/* harmony export */ TextureMapUnits: () => (/* reexport safe */ _MaterialProps__WEBPACK_IMPORTED_MODULE_83__.TextureMapUnits),
|
|
74006
74042
|
/* harmony export */ TextureMapping: () => (/* reexport safe */ _TextureMapping__WEBPACK_IMPORTED_MODULE_111__.TextureMapping),
|
|
@@ -74073,7 +74109,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
74073
74109
|
/* harmony export */ readElementMeshes: () => (/* reexport safe */ _ElementMesh__WEBPACK_IMPORTED_MODULE_29__.readElementMeshes),
|
|
74074
74110
|
/* harmony export */ readTileContentDescription: () => (/* reexport safe */ _tile_TileMetadata__WEBPACK_IMPORTED_MODULE_157__.readTileContentDescription),
|
|
74075
74111
|
/* harmony export */ rpcOverIpcStrings: () => (/* reexport safe */ _ipc_IpcSession__WEBPACK_IMPORTED_MODULE_75__.rpcOverIpcStrings),
|
|
74076
|
-
/* harmony export */ textAnnotationFrameShapes: () => (/* reexport safe */
|
|
74112
|
+
/* harmony export */ textAnnotationFrameShapes: () => (/* reexport safe */ _annotation_TextStyle__WEBPACK_IMPORTED_MODULE_6__.textAnnotationFrameShapes),
|
|
74077
74113
|
/* harmony export */ tileFormatFromNumber: () => (/* reexport safe */ _tile_TileIO__WEBPACK_IMPORTED_MODULE_156__.tileFormatFromNumber)
|
|
74078
74114
|
/* harmony export */ });
|
|
74079
74115
|
/* harmony import */ var _AmbientOcclusion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AmbientOcclusion */ "../../core/common/lib/esm/AmbientOcclusion.js");
|
|
@@ -84636,7 +84672,7 @@ class IModelReadRpcInterface extends _RpcInterface__WEBPACK_IMPORTED_MODULE_0__.
|
|
|
84636
84672
|
async getViewStateData(_iModelToken, _viewDefinitionId, _options) { return this.forward(arguments); }
|
|
84637
84673
|
async readFontJson(_iModelToken) { return this.forward(arguments); } // eslint-disable-line @typescript-eslint/no-deprecated
|
|
84638
84674
|
async getToolTipMessage(_iModelToken, _elementId) { return this.forward(arguments); }
|
|
84639
|
-
/** @deprecated in 3.
|
|
84675
|
+
/** @deprecated in 3.3.0 - might be removed in next major version. Use ViewStore apis. */
|
|
84640
84676
|
async getViewThumbnail(_iModelToken, _viewId) { return this.forward(arguments); }
|
|
84641
84677
|
async getDefaultViewId(_iModelToken) { return this.forward(arguments); }
|
|
84642
84678
|
async getCustomViewState3dData(_iModelToken, _options) { return this.forward(arguments); }
|
|
@@ -97062,6 +97098,7 @@ class ECClass extends _SchemaItem__WEBPACK_IMPORTED_MODULE_9__.SchemaItem {
|
|
|
97062
97098
|
else
|
|
97063
97099
|
correctType = structType;
|
|
97064
97100
|
if (!correctType)
|
|
97101
|
+
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
|
97065
97102
|
throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECSchemaError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECSchemaStatus.InvalidType, `The provided Struct type, ${structType}, is not a valid StructClass.`);
|
|
97066
97103
|
return correctType;
|
|
97067
97104
|
}
|
|
@@ -97081,6 +97118,7 @@ class ECClass extends _SchemaItem__WEBPACK_IMPORTED_MODULE_9__.SchemaItem {
|
|
|
97081
97118
|
else
|
|
97082
97119
|
correctType = structType;
|
|
97083
97120
|
if (!correctType)
|
|
97121
|
+
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
|
97084
97122
|
throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECSchemaError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECSchemaStatus.InvalidType, `The provided Struct type, ${structType}, is not a valid StructClass.`);
|
|
97085
97123
|
return correctType;
|
|
97086
97124
|
}
|
|
@@ -106859,7 +106897,7 @@ class AccuDraw {
|
|
|
106859
106897
|
applyDistanceRoundOff(distance, vp) {
|
|
106860
106898
|
if (!this._distanceRoundOff.active || !this._distanceRoundOff.units.size)
|
|
106861
106899
|
return undefined;
|
|
106862
|
-
let roundValue = this._distanceRoundOff.units.values().next().value;
|
|
106900
|
+
let roundValue = this._distanceRoundOff.units.values().next().value ?? 0;
|
|
106863
106901
|
if (this._distanceRoundOff.units.size > 1) {
|
|
106864
106902
|
// NOTE: Set isn't ordered, find smallest entry...
|
|
106865
106903
|
this._distanceRoundOff.units.forEach((thisRoundValue) => {
|
|
@@ -106883,7 +106921,7 @@ class AccuDraw {
|
|
|
106883
106921
|
applyAngleRoundOff(angle, distance, vp) {
|
|
106884
106922
|
if (!this._angleRoundOff.active || !this._angleRoundOff.units.size)
|
|
106885
106923
|
return undefined;
|
|
106886
|
-
let roundValue = this._angleRoundOff.units.values().next().value;
|
|
106924
|
+
let roundValue = this._angleRoundOff.units.values().next().value ?? 0;
|
|
106887
106925
|
if (this._angleRoundOff.units.size > 1) {
|
|
106888
106926
|
// NOTE: Set isn't ordered, find smallest entry...
|
|
106889
106927
|
this._angleRoundOff.units.forEach((thisRoundValue) => {
|
|
@@ -108396,6 +108434,8 @@ class AccuSnap {
|
|
|
108396
108434
|
this.errorKey = out.reason;
|
|
108397
108435
|
this.errorIcon.deactivate();
|
|
108398
108436
|
const vp = ev.viewport;
|
|
108437
|
+
if (undefined === vp)
|
|
108438
|
+
return;
|
|
108399
108439
|
let errorSprite;
|
|
108400
108440
|
switch (out.snapStatus) {
|
|
108401
108441
|
case _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.FilteredByApp:
|
|
@@ -108780,8 +108820,10 @@ class AccuSnap {
|
|
|
108780
108820
|
// points not on the grid. This causes them to be "pulled" off the grid when they are accepted. On
|
|
108781
108821
|
// the other hand, when NOT locating, we need to use the raw point so we can snap to elements
|
|
108782
108822
|
// away from the grid.
|
|
108783
|
-
const testPoint = this.isLocateEnabled ? ev.point : ev.rawPoint;
|
|
108784
108823
|
const vp = ev.viewport;
|
|
108824
|
+
if (undefined === vp)
|
|
108825
|
+
return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.NoElements;
|
|
108826
|
+
const testPoint = this.isLocateEnabled ? ev.point : ev.rawPoint;
|
|
108785
108827
|
const picker = _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.locateManager.picker;
|
|
108786
108828
|
const options = _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.locateManager.options.clone(); // Copy to avoid changing out from under active Tool...
|
|
108787
108829
|
// NOTE: Since TestHit will use the same HitSource as the input hit we only need to sets this for DoPick...
|
|
@@ -108823,6 +108865,8 @@ class AccuSnap {
|
|
|
108823
108865
|
}
|
|
108824
108866
|
}
|
|
108825
108867
|
const thisList = this.aSnapHits;
|
|
108868
|
+
if (undefined === thisList)
|
|
108869
|
+
return undefined;
|
|
108826
108870
|
let thisHit;
|
|
108827
108871
|
let firstRejected;
|
|
108828
108872
|
const filterResponse = new _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.LocateResponse();
|
|
@@ -108856,7 +108900,7 @@ class AccuSnap {
|
|
|
108856
108900
|
// if we don't have any more candidate hits, get a new list at the current location
|
|
108857
108901
|
if (!this.aSnapHits || (0 === this.aSnapHits.length)) {
|
|
108858
108902
|
out.snapStatus = this.findHits(ev);
|
|
108859
|
-
hit = (_ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Success !== out.snapStatus) ? undefined : await this.getAccuSnapDetail(this.aSnapHits, out);
|
|
108903
|
+
hit = (_ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Success !== out.snapStatus || undefined === this.aSnapHits) ? undefined : await this.getAccuSnapDetail(this.aSnapHits, out);
|
|
108860
108904
|
}
|
|
108861
108905
|
else {
|
|
108862
108906
|
// drop the current hit from the list and then retest the list (without the dropped hit) to find the new snap
|
|
@@ -108883,13 +108927,16 @@ class AccuSnap {
|
|
|
108883
108927
|
*/
|
|
108884
108928
|
async onMotion(ev) {
|
|
108885
108929
|
this.clearToolTip(ev);
|
|
108930
|
+
const vp = ev.viewport;
|
|
108931
|
+
if (undefined === vp)
|
|
108932
|
+
return;
|
|
108886
108933
|
const out = new _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.LocateResponse();
|
|
108887
108934
|
out.snapStatus = _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Disabled;
|
|
108888
108935
|
let hit;
|
|
108889
108936
|
if (this.isActive) {
|
|
108890
108937
|
if (this._doSnapping) {
|
|
108891
108938
|
out.snapStatus = this.findHits(ev);
|
|
108892
|
-
hit = (_ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Success !== out.snapStatus) ? undefined : await this.getAccuSnapDetail(this.aSnapHits, out);
|
|
108939
|
+
hit = (_ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Success !== out.snapStatus || undefined === this.aSnapHits) ? undefined : await this.getAccuSnapDetail(this.aSnapHits, out);
|
|
108893
108940
|
if (!this._doSnapping)
|
|
108894
108941
|
hit = undefined; // Snap no longer requested...
|
|
108895
108942
|
}
|
|
@@ -108904,7 +108951,7 @@ class AccuSnap {
|
|
|
108904
108951
|
this.setCurrHit(hit);
|
|
108905
108952
|
// set up active error before calling displayToolTip to indicate error or show locate message...
|
|
108906
108953
|
this.showSnapError(out, ev);
|
|
108907
|
-
this.displayToolTip(ev.viewPoint,
|
|
108954
|
+
this.displayToolTip(ev.viewPoint, vp, ev.rawPoint);
|
|
108908
108955
|
if (undefined !== this.touchCursor && _tools_Tool__WEBPACK_IMPORTED_MODULE_6__.InputSource.Mouse === ev.inputSource) {
|
|
108909
108956
|
this.touchCursor = undefined;
|
|
108910
108957
|
_IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.viewManager.invalidateDecorationsAllViews();
|
|
@@ -109502,7 +109549,7 @@ class AuxCoordSystem2dState extends AuxCoordSystemState {
|
|
|
109502
109549
|
super(props, iModel);
|
|
109503
109550
|
this.origin = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.fromJSON(props.origin);
|
|
109504
109551
|
this.angle = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asDouble(props.angle);
|
|
109505
|
-
this._rMatrix = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ(), _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createDegrees(this.angle));
|
|
109552
|
+
this._rMatrix = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ(), _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createDegrees(this.angle)) ?? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createIdentity();
|
|
109506
109553
|
}
|
|
109507
109554
|
toJSON() {
|
|
109508
109555
|
const val = super.toJSON();
|
|
@@ -112637,6 +112684,7 @@ class SectionAttachment {
|
|
|
112637
112684
|
is3d: true,
|
|
112638
112685
|
scale: { x: 1, y: 1 },
|
|
112639
112686
|
},
|
|
112687
|
+
contours: view.getDisplayStyle3d().settings.contours
|
|
112640
112688
|
};
|
|
112641
112689
|
this._viewFlagOverrides = { ...view.viewFlags, lighting: false, shadows: false };
|
|
112642
112690
|
// Save off the original frustum (potentially adjusted by viewport).
|
|
@@ -144031,7 +144079,7 @@ class BatchUniforms {
|
|
|
144031
144079
|
this._sensors.bindTexture(uniform);
|
|
144032
144080
|
}
|
|
144033
144081
|
get wantContourLines() {
|
|
144034
|
-
const contours = this._target.
|
|
144082
|
+
const contours = this._target.currentBranch.contourLine;
|
|
144035
144083
|
return undefined !== contours && contours.displayContours && contours.groups.length > 0;
|
|
144036
144084
|
}
|
|
144037
144085
|
bindContourLUT(uniform) {
|
|
@@ -144163,6 +144211,7 @@ class BranchStack {
|
|
|
144163
144211
|
viewFlags: new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ViewFlags(),
|
|
144164
144212
|
transform: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity(),
|
|
144165
144213
|
edgeSettings: _EdgeSettings__WEBPACK_IMPORTED_MODULE_5__.EdgeSettings.create(undefined),
|
|
144214
|
+
contourLine: undefined,
|
|
144166
144215
|
is3d: true,
|
|
144167
144216
|
symbologyOverrides: new _render_FeatureSymbology__WEBPACK_IMPORTED_MODULE_3__.FeatureSymbology.Overrides(),
|
|
144168
144217
|
});
|
|
@@ -144191,9 +144240,9 @@ class BranchStack {
|
|
|
144191
144240
|
this._stack.pop();
|
|
144192
144241
|
}
|
|
144193
144242
|
}
|
|
144194
|
-
changeRenderPlan(vf, is3d, hline) {
|
|
144243
|
+
changeRenderPlan(vf, is3d, hline, contour) {
|
|
144195
144244
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(1 === this.length);
|
|
144196
|
-
this.top.changeRenderPlan(vf, is3d, hline);
|
|
144245
|
+
this.top.changeRenderPlan(vf, is3d, hline, contour);
|
|
144197
144246
|
}
|
|
144198
144247
|
setSymbologyOverrides(ovrs) {
|
|
144199
144248
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(1 === this.length);
|
|
@@ -144256,16 +144305,18 @@ class BranchState {
|
|
|
144256
144305
|
get inSectionDrawingAttachment() { return this._opts.inSectionDrawingAttachment; }
|
|
144257
144306
|
get groupNodeId() { return this._opts.groupNodeId; }
|
|
144258
144307
|
get disableClipStyle() { return this._opts.disableClipStyle; }
|
|
144308
|
+
get contourLine() { return this._opts.contourLine; }
|
|
144259
144309
|
get symbologyOverrides() {
|
|
144260
144310
|
return this._opts.symbologyOverrides;
|
|
144261
144311
|
}
|
|
144262
144312
|
set symbologyOverrides(ovrs) {
|
|
144263
144313
|
this._opts.symbologyOverrides = ovrs;
|
|
144264
144314
|
}
|
|
144265
|
-
changeRenderPlan(viewFlags, is3d, hline) {
|
|
144315
|
+
changeRenderPlan(viewFlags, is3d, hline, contour) {
|
|
144266
144316
|
this.viewFlags = viewFlags;
|
|
144267
144317
|
this._opts.is3d = is3d;
|
|
144268
144318
|
this.edgeSettings.init(hline);
|
|
144319
|
+
this._opts.contourLine = contour;
|
|
144269
144320
|
}
|
|
144270
144321
|
/** Create a BranchState from a Branch. Any properties not explicitly specified by the new Branch are inherited from the previous BranchState. */
|
|
144271
144322
|
static fromBranch(prev, branch) {
|
|
@@ -144290,6 +144341,7 @@ class BranchState {
|
|
|
144290
144341
|
inSectionDrawingAttachment: branch.inSectionDrawingAttachment ?? prev.inSectionDrawingAttachment,
|
|
144291
144342
|
groupNodeId: branch.branch.groupNodeId ?? prev.groupNodeId,
|
|
144292
144343
|
disableClipStyle: branch.disableClipStyle ?? prev.disableClipStyle,
|
|
144344
|
+
contourLine: branch.contourLine ?? prev.contourLine,
|
|
144293
144345
|
});
|
|
144294
144346
|
}
|
|
144295
144347
|
getFeatureAppearance(overrides, elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId) {
|
|
@@ -144452,8 +144504,8 @@ class BranchUniforms {
|
|
|
144452
144504
|
this._viewClipEnabled = false;
|
|
144453
144505
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)((this._target.isReadPixelsInProgress ? 2 : 1) === this._stack.length);
|
|
144454
144506
|
}
|
|
144455
|
-
changeRenderPlan(vf, is3d, hline) {
|
|
144456
|
-
this._stack.changeRenderPlan(vf, is3d, hline);
|
|
144507
|
+
changeRenderPlan(vf, is3d, hline, contourLine) {
|
|
144508
|
+
this._stack.changeRenderPlan(vf, is3d, hline, contourLine);
|
|
144457
144509
|
}
|
|
144458
144510
|
updateViewClip(clip, style) {
|
|
144459
144511
|
this.clipStack.setViewClip(clip, style);
|
|
@@ -146215,12 +146267,11 @@ class ContourUniforms {
|
|
|
146215
146267
|
this._contourDefs[startNdx + offset + 1] = majorIntervalCount < 1.0 ? 1.0 : majorIntervalCount;
|
|
146216
146268
|
}
|
|
146217
146269
|
update(target) {
|
|
146218
|
-
|
|
146219
|
-
if (this.contourDisplay && plan.contours && this.contourDisplay.equals(plan.contours)) {
|
|
146270
|
+
if (this.contourDisplay && target.currentContours && this.contourDisplay.equals(target.currentContours)) {
|
|
146220
146271
|
return;
|
|
146221
146272
|
}
|
|
146222
146273
|
(0,_Sync__WEBPACK_IMPORTED_MODULE_1__.desync)(this);
|
|
146223
|
-
this._contourDisplay =
|
|
146274
|
+
this._contourDisplay = target.currentContours;
|
|
146224
146275
|
if (undefined === this.contourDisplay)
|
|
146225
146276
|
return;
|
|
146226
146277
|
/* uniform packing for contourDefs:
|
|
@@ -146310,14 +146361,14 @@ class Contours {
|
|
|
146310
146361
|
return target === this.target && this._numFeatures === map.numFeatures;
|
|
146311
146362
|
}
|
|
146312
146363
|
matchesSubCategories() {
|
|
146313
|
-
if (this._contours === undefined && this.target.
|
|
146364
|
+
if (this._contours === undefined && this.target.currentContours === undefined)
|
|
146314
146365
|
return true;
|
|
146315
|
-
if (this._contours === undefined || this.target.
|
|
146366
|
+
if (this._contours === undefined || this.target.currentContours === undefined)
|
|
146316
146367
|
return false;
|
|
146317
|
-
if (this._contours.groups.length !== this.target.
|
|
146368
|
+
if (this._contours.groups.length !== this.target.currentContours.groups.length)
|
|
146318
146369
|
return false;
|
|
146319
146370
|
for (let index = 0, len = this._contours.groups.length; index < len && index < _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ContourDisplay.maxContourGroups; ++index) {
|
|
146320
|
-
if (!this._contours.groups[index].subCategoriesEqual(this.target.
|
|
146371
|
+
if (!this._contours.groups[index].subCategoriesEqual(this.target.currentContours.groups[index]))
|
|
146321
146372
|
return false;
|
|
146322
146373
|
}
|
|
146323
146374
|
return true;
|
|
@@ -146331,14 +146382,14 @@ class Contours {
|
|
|
146331
146382
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(width * height * 8 >= this._numFeatures);
|
|
146332
146383
|
const data = new Uint8Array(width * height * 4);
|
|
146333
146384
|
const creator = new _Texture__WEBPACK_IMPORTED_MODULE_5__.Texture2DDataUpdater(data);
|
|
146334
|
-
this.buildLookupTable(creator, map, this.target.
|
|
146385
|
+
this.buildLookupTable(creator, map, this.target.currentContours);
|
|
146335
146386
|
this._lut = _Texture__WEBPACK_IMPORTED_MODULE_5__.TextureHandle.createForData(width, height, data, true, _GL__WEBPACK_IMPORTED_MODULE_2__.GL.Texture.WrapMode.ClampToEdge);
|
|
146336
146387
|
this._lutWidth = width;
|
|
146337
146388
|
}
|
|
146338
146389
|
_update(map, lut) {
|
|
146339
146390
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(this._numFeatures === map.numFeatures);
|
|
146340
146391
|
const updater = new _Texture__WEBPACK_IMPORTED_MODULE_5__.Texture2DDataUpdater(lut.dataBytes);
|
|
146341
|
-
this.buildLookupTable(updater, map, this.target.
|
|
146392
|
+
this.buildLookupTable(updater, map, this.target.currentContours);
|
|
146342
146393
|
lut.update(updater);
|
|
146343
146394
|
}
|
|
146344
146395
|
buildLookupTable(data, map, contours) {
|
|
@@ -146376,7 +146427,7 @@ class Contours {
|
|
|
146376
146427
|
constructor(target, options) {
|
|
146377
146428
|
this.target = target;
|
|
146378
146429
|
this._options = options;
|
|
146379
|
-
this._contours = target.
|
|
146430
|
+
this._contours = target.currentContours;
|
|
146380
146431
|
}
|
|
146381
146432
|
static createFromTarget(target, options) {
|
|
146382
146433
|
return new Contours(target, options);
|
|
@@ -146393,7 +146444,7 @@ class Contours {
|
|
|
146393
146444
|
update(features) {
|
|
146394
146445
|
if (this.matchesSubCategories())
|
|
146395
146446
|
return;
|
|
146396
|
-
this._contours = this.target.
|
|
146447
|
+
this._contours = this.target.currentContours;
|
|
146397
146448
|
// _lut can be undefined if context was lost, (gl.createTexture returns null)
|
|
146398
146449
|
if (this._lut) {
|
|
146399
146450
|
this._update(features, this._lut);
|
|
@@ -149158,6 +149209,7 @@ class Branch extends Graphic {
|
|
|
149158
149209
|
inSectionDrawingAttachment;
|
|
149159
149210
|
disableClipStyle;
|
|
149160
149211
|
transformFromExternalIModel;
|
|
149212
|
+
contourLine;
|
|
149161
149213
|
constructor(branch, localToWorld, viewFlags, opts) {
|
|
149162
149214
|
super();
|
|
149163
149215
|
this.branch = branch;
|
|
@@ -149174,6 +149226,7 @@ class Branch extends Graphic {
|
|
|
149174
149226
|
this.inSectionDrawingAttachment = opts.inSectionDrawingAttachment;
|
|
149175
149227
|
this.disableClipStyle = opts.disableClipStyle;
|
|
149176
149228
|
this.transformFromExternalIModel = opts.transformFromIModel;
|
|
149229
|
+
this.contourLine = opts.contours;
|
|
149177
149230
|
if (opts.hline)
|
|
149178
149231
|
this.edgeSettings = _EdgeSettings__WEBPACK_IMPORTED_MODULE_6__.EdgeSettings.create(opts.hline);
|
|
149179
149232
|
if (opts.classifierOrDrape instanceof _PlanarClassifier__WEBPACK_IMPORTED_MODULE_8__.PlanarClassifier)
|
|
@@ -156154,7 +156207,7 @@ class Compositor extends SceneCompositor {
|
|
|
156154
156207
|
}
|
|
156155
156208
|
readContours(rect) {
|
|
156156
156209
|
// Are we actually drawing any contours? If not, don't bother reading an array of all zeroes off the GPU.
|
|
156157
|
-
const contours = this.target.
|
|
156210
|
+
const contours = this.target.currentContours;
|
|
156158
156211
|
if (!contours || !contours.displayContours || contours.groups.length === 0) {
|
|
156159
156212
|
return undefined;
|
|
156160
156213
|
}
|
|
@@ -156332,6 +156385,7 @@ class Compositor extends SceneCompositor {
|
|
|
156332
156385
|
iModel: top.iModel,
|
|
156333
156386
|
is3d: top.is3d,
|
|
156334
156387
|
edgeSettings: top.edgeSettings,
|
|
156388
|
+
contourLine: top.contourLine,
|
|
156335
156389
|
});
|
|
156336
156390
|
this._vcSetStencilRenderState = new _RenderState__WEBPACK_IMPORTED_MODULE_14__.RenderState();
|
|
156337
156391
|
this._vcCopyZRenderState = new _RenderState__WEBPACK_IMPORTED_MODULE_14__.RenderState();
|
|
@@ -160804,6 +160858,7 @@ class Target extends _render_RenderTarget__WEBPACK_IMPORTED_MODULE_7__.RenderTar
|
|
|
160804
160858
|
const drape = this.currentTextureDrape;
|
|
160805
160859
|
return undefined === drape ? this.currentPlanarClassifier : drape;
|
|
160806
160860
|
}
|
|
160861
|
+
get currentContours() { return this.currentBranch.contourLine; }
|
|
160807
160862
|
modelToView(modelPt, result) {
|
|
160808
160863
|
return this.uniforms.branch.modelViewMatrix.multiplyPoint3dQuietNormalize(modelPt, result);
|
|
160809
160864
|
}
|
|
@@ -161014,7 +161069,7 @@ class Target extends _render_RenderTarget__WEBPACK_IMPORTED_MODULE_7__.RenderTar
|
|
|
161014
161069
|
this._wantAmbientOcclusion = false;
|
|
161015
161070
|
vf = vf.with("ambientOcclusion", false);
|
|
161016
161071
|
}
|
|
161017
|
-
this.uniforms.branch.changeRenderPlan(vf, plan.is3d, plan.hline);
|
|
161072
|
+
this.uniforms.branch.changeRenderPlan(vf, plan.is3d, plan.hline, plan.contours);
|
|
161018
161073
|
this.changeFrustum(plan.frustum, plan.fraction, plan.is3d);
|
|
161019
161074
|
this.uniforms.thematic.update(this);
|
|
161020
161075
|
this.uniforms.contours.update(this);
|
|
@@ -161313,6 +161368,7 @@ class Target extends _render_RenderTarget__WEBPACK_IMPORTED_MODULE_7__.RenderTar
|
|
|
161313
161368
|
edgeSettings: top.edgeSettings,
|
|
161314
161369
|
transform: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity(),
|
|
161315
161370
|
clipVolume: top.clipVolume,
|
|
161371
|
+
contourLine: top.contourLine,
|
|
161316
161372
|
});
|
|
161317
161373
|
this.pushState(state);
|
|
161318
161374
|
// Repopulate the command list, omitting non-pickable decorations and putting transparent stuff into the opaque passes.
|
|
@@ -178392,7 +178448,7 @@ var RealityTreeId;
|
|
|
178392
178448
|
function compareWithoutModelId(lhs, rhs) {
|
|
178393
178449
|
return (compareRealityDataSourceKeys(lhs.rdSourceKey, rhs.rdSourceKey) ||
|
|
178394
178450
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareBooleans)(lhs.deduplicateVertices, rhs.deduplicateVertices) ||
|
|
178395
|
-
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.
|
|
178451
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStringsOrUndefined)(lhs.produceGeometry, rhs.produceGeometry) ||
|
|
178396
178452
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStringsOrUndefined)(lhs.maskModelIds, rhs.maskModelIds) ||
|
|
178397
178453
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.comparePossiblyUndefined)((ltf, rtf) => compareTransforms(ltf, rtf), lhs.transform, rhs.transform));
|
|
178398
178454
|
}
|
|
@@ -178586,10 +178642,11 @@ class RealityModelTileTreeParams {
|
|
|
178586
178642
|
loader;
|
|
178587
178643
|
rootTile;
|
|
178588
178644
|
baseUrl;
|
|
178645
|
+
reprojectGeometry;
|
|
178589
178646
|
get location() { return this.loader.tree.location; }
|
|
178590
178647
|
get yAxisUp() { return this.loader.tree.yAxisUp; }
|
|
178591
178648
|
get priority() { return this.loader.priority; }
|
|
178592
|
-
constructor(tileTreeId, iModel, modelId, loader, gcsConverterAvailable, rootToEcef, baseUrl) {
|
|
178649
|
+
constructor(tileTreeId, iModel, modelId, loader, gcsConverterAvailable, rootToEcef, baseUrl, reprojectGeometry) {
|
|
178593
178650
|
this.gcsConverterAvailable = gcsConverterAvailable;
|
|
178594
178651
|
this.rootToEcef = rootToEcef;
|
|
178595
178652
|
this.loader = loader;
|
|
@@ -178605,6 +178662,7 @@ class RealityModelTileTreeParams {
|
|
|
178605
178662
|
usesGeometricError: loader.tree.usesGeometricError,
|
|
178606
178663
|
});
|
|
178607
178664
|
this.baseUrl = baseUrl;
|
|
178665
|
+
this.reprojectGeometry = reprojectGeometry;
|
|
178608
178666
|
}
|
|
178609
178667
|
}
|
|
178610
178668
|
class RealityModelTileProps {
|
|
@@ -178711,7 +178769,7 @@ class RealityModelTileLoader extends _tile_internal__WEBPACK_IMPORTED_MODULE_8__
|
|
|
178711
178769
|
_viewFlagOverrides;
|
|
178712
178770
|
_deduplicateVertices;
|
|
178713
178771
|
constructor(tree, batchedIdMap, opts) {
|
|
178714
|
-
super(opts?.produceGeometry
|
|
178772
|
+
super(opts?.produceGeometry);
|
|
178715
178773
|
this.tree = tree;
|
|
178716
178774
|
this._batchedIdMap = batchedIdMap;
|
|
178717
178775
|
this._deduplicateVertices = opts?.deduplicateVertices ?? false;
|
|
@@ -178943,9 +179001,9 @@ class RealityModelTileTree extends _tile_internal__WEBPACK_IMPORTED_MODULE_8__.R
|
|
|
178943
179001
|
const props = await getTileTreeProps(rdSource, tilesetToDb, iModel);
|
|
178944
179002
|
const loader = new RealityModelTileLoader(props, new _tile_internal__WEBPACK_IMPORTED_MODULE_8__.BatchedTileIdMap(iModel), opts);
|
|
178945
179003
|
const gcsConverterAvailable = await (0,_tile_internal__WEBPACK_IMPORTED_MODULE_8__.getGcsConverterAvailable)(iModel);
|
|
178946
|
-
//The full tileset url is needed so that it includes the url's search parameters if any are present
|
|
179004
|
+
// The full tileset url is needed so that it includes the url's search parameters if any are present
|
|
178947
179005
|
const baseUrl = rdSource instanceof _RealityDataSourceTilesetUrlImpl__WEBPACK_IMPORTED_MODULE_9__.RealityDataSourceTilesetUrlImpl ? rdSource.getTilesetUrl() : undefined;
|
|
178948
|
-
const params = new RealityModelTileTreeParams(tileTreeId, iModel, modelId, loader, gcsConverterAvailable, props.tilesetToEcef, baseUrl);
|
|
179006
|
+
const params = new RealityModelTileTreeParams(tileTreeId, iModel, modelId, loader, gcsConverterAvailable, props.tilesetToEcef, baseUrl, opts?.produceGeometry === "reproject");
|
|
178949
179007
|
return new RealityModelTileTree(params);
|
|
178950
179008
|
}
|
|
178951
179009
|
return undefined;
|
|
@@ -179039,14 +179097,14 @@ class RealityTreeReference extends RealityModelTileTree.Reference {
|
|
|
179039
179097
|
get treeOwner() {
|
|
179040
179098
|
return realityTreeSupplier.getOwner(this.createTreeId(this.modelId), this.iModel);
|
|
179041
179099
|
}
|
|
179042
|
-
_createGeometryTreeReference() {
|
|
179100
|
+
_createGeometryTreeReference(options) {
|
|
179043
179101
|
const ref = new RealityTreeReference({
|
|
179044
179102
|
iModel: this.iModel,
|
|
179045
179103
|
modelId: this.modelId,
|
|
179046
179104
|
source: this._source,
|
|
179047
179105
|
rdSourceKey: this._rdSourceKey,
|
|
179048
179106
|
name: this._name,
|
|
179049
|
-
produceGeometry:
|
|
179107
|
+
produceGeometry: options?.reprojectGeometry ? "reproject" : "yes",
|
|
179050
179108
|
getDisplaySettings: () => _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RealityModelDisplaySettings.defaults,
|
|
179051
179109
|
});
|
|
179052
179110
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== ref.collectTileGeometry);
|
|
@@ -179277,7 +179335,7 @@ class RealityTileLoader {
|
|
|
179277
179335
|
const blob = data;
|
|
179278
179336
|
const streamBuffer = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.ByteStream.fromUint8Array(blob);
|
|
179279
179337
|
const realityTile = tile;
|
|
179280
|
-
return this._produceGeometry ? this.loadGeometryFromStream(realityTile, streamBuffer, system) : this.loadGraphicsFromStream(realityTile, streamBuffer, system, isCanceled);
|
|
179338
|
+
return (this._produceGeometry && this._produceGeometry !== "no") ? this.loadGeometryFromStream(realityTile, streamBuffer, system) : this.loadGraphicsFromStream(realityTile, streamBuffer, system, isCanceled);
|
|
179281
179339
|
}
|
|
179282
179340
|
_getFormat(streamBuffer) {
|
|
179283
179341
|
const position = streamBuffer.curPos;
|
|
@@ -179293,7 +179351,15 @@ class RealityTileLoader {
|
|
|
179293
179351
|
const reader = _tile_internal__WEBPACK_IMPORTED_MODULE_7__.B3dmReader.create(streamBuffer, iModel, modelId, is3d, tile.contentRange, system, yAxisUp, tile.isLeaf, tile.center, tile.transformToRoot, undefined, this.getBatchIdMap());
|
|
179294
179352
|
if (reader)
|
|
179295
179353
|
reader.defaultWrapMode = _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_6__.GltfWrapMode.ClampToEdge;
|
|
179296
|
-
|
|
179354
|
+
const geom = reader?.readGltfAndCreateGeometry(tile.tree.iModelTransform);
|
|
179355
|
+
const xForm = tile.reprojectionTransform;
|
|
179356
|
+
if (tile.tree.reprojectGeometry && geom?.polyfaces && xForm) {
|
|
179357
|
+
const polyfaces = geom.polyfaces.map((pf) => pf.cloneTransformed(xForm));
|
|
179358
|
+
return { geometry: { polyfaces } };
|
|
179359
|
+
}
|
|
179360
|
+
else {
|
|
179361
|
+
return { geometry: geom };
|
|
179362
|
+
}
|
|
179297
179363
|
}
|
|
179298
179364
|
async loadGraphicsFromStream(tile, streamBuffer, system, isCanceled) {
|
|
179299
179365
|
const format = this._getFormat(streamBuffer);
|
|
@@ -190237,6 +190303,12 @@ class RealityTile extends _internal__WEBPACK_IMPORTED_MODULE_5__.Tile {
|
|
|
190237
190303
|
/** @internal */
|
|
190238
190304
|
_copyright;
|
|
190239
190305
|
/** @internal */
|
|
190306
|
+
tree;
|
|
190307
|
+
/** @internal */
|
|
190308
|
+
get reprojectionTransform() {
|
|
190309
|
+
return this._reprojectionTransform;
|
|
190310
|
+
}
|
|
190311
|
+
/** @internal */
|
|
190240
190312
|
constructor(props, tree) {
|
|
190241
190313
|
super(props, tree);
|
|
190242
190314
|
this.transformToRoot = props.transformToRoot;
|
|
@@ -190245,6 +190317,7 @@ class RealityTile extends _internal__WEBPACK_IMPORTED_MODULE_5__.Tile {
|
|
|
190245
190317
|
this.rangeCorners = props.rangeCorners;
|
|
190246
190318
|
this.region = props.region;
|
|
190247
190319
|
this._geometricError = props.geometricError;
|
|
190320
|
+
this.tree = tree;
|
|
190248
190321
|
if (undefined === this.transformToRoot)
|
|
190249
190322
|
return;
|
|
190250
190323
|
// Can transform be non-rigid?? -- if so would have to handle (readonly) radius.
|
|
@@ -190905,6 +190978,9 @@ class RealityTileTree extends _internal__WEBPACK_IMPORTED_MODULE_6__.TileTree {
|
|
|
190905
190978
|
_ecefToDb;
|
|
190906
190979
|
/** @internal */
|
|
190907
190980
|
baseUrl;
|
|
190981
|
+
/** If set to true, tile geometry will be reprojected using the tile's reprojection transform when geometry is collected.
|
|
190982
|
+
* @internal */
|
|
190983
|
+
reprojectGeometry;
|
|
190908
190984
|
/** @internal */
|
|
190909
190985
|
constructor(params) {
|
|
190910
190986
|
super(params);
|
|
@@ -190923,6 +190999,7 @@ class RealityTileTree extends _internal__WEBPACK_IMPORTED_MODULE_6__.TileTree {
|
|
|
190923
190999
|
}
|
|
190924
191000
|
}
|
|
190925
191001
|
this.baseUrl = params.baseUrl;
|
|
191002
|
+
this.reprojectGeometry = params.reprojectGeometry;
|
|
190926
191003
|
}
|
|
190927
191004
|
/** The mapping of per-feature JSON properties from this tile tree's batch table, if one is defined.
|
|
190928
191005
|
* @beta
|
|
@@ -194288,6 +194365,10 @@ var TileGraphicType;
|
|
|
194288
194365
|
* @extensions
|
|
194289
194366
|
*/
|
|
194290
194367
|
class TileTreeReference /* implements RenderMemory.Consumer */ {
|
|
194368
|
+
/** If set to true, tile geometry will be reprojected using the tile's reprojection transform when geometry is collected from the referenced TileTree.
|
|
194369
|
+
* @internal
|
|
194370
|
+
*/
|
|
194371
|
+
reprojectGeometry;
|
|
194291
194372
|
/** Force a new tree owner / tile tree to be created for the current tile tree reference
|
|
194292
194373
|
* @internal
|
|
194293
194374
|
*/
|
|
@@ -194483,7 +194564,7 @@ class TileTreeReference /* implements RenderMemory.Consumer */ {
|
|
|
194483
194564
|
* Return `undefined` if geometry collection is not supported.
|
|
194484
194565
|
* @see [[createGeometryTreeReference]].
|
|
194485
194566
|
*/
|
|
194486
|
-
_createGeometryTreeReference() {
|
|
194567
|
+
_createGeometryTreeReference(_options) {
|
|
194487
194568
|
return undefined;
|
|
194488
194569
|
}
|
|
194489
194570
|
/** If defined, supplies the implementation of [[GeometryTileTreeReference.collectTileGeometry]].
|
|
@@ -194508,12 +194589,14 @@ class TileTreeReference /* implements RenderMemory.Consumer */ {
|
|
|
194508
194589
|
* Currently, only terrain and reality model tiles support geometry collection.
|
|
194509
194590
|
* @note Do not override this method - override [[_createGeometryTreeReference]] instead.
|
|
194510
194591
|
*/
|
|
194511
|
-
createGeometryTreeReference() {
|
|
194592
|
+
createGeometryTreeReference(options) {
|
|
194512
194593
|
if (this.collectTileGeometry) {
|
|
194513
194594
|
// Unclear why compiler doesn't detect that `this` satisfies the GeometryTileTreeReference interface...it must be looking only at the types, not this particular instance.
|
|
194514
|
-
|
|
194595
|
+
const ref = this;
|
|
194596
|
+
ref.reprojectGeometry = options?.reprojectGeometry;
|
|
194597
|
+
return ref;
|
|
194515
194598
|
}
|
|
194516
|
-
return this._createGeometryTreeReference();
|
|
194599
|
+
return this._createGeometryTreeReference(options);
|
|
194517
194600
|
}
|
|
194518
194601
|
/** Create a [[TileTreeReference]] that displays a pre-defined [[RenderGraphic]].
|
|
194519
194602
|
* The reference can be used to add dynamic content to a [[Viewport]]'s scene as a [[TiledGraphicsProvider]], as in the following example:
|
|
@@ -202409,6 +202492,8 @@ class ViewClipTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitive
|
|
|
202409
202492
|
zHigh = projection;
|
|
202410
202493
|
}
|
|
202411
202494
|
}
|
|
202495
|
+
if (undefined === zLow || undefined === zHigh)
|
|
202496
|
+
return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range1d.createNull();
|
|
202412
202497
|
return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range1d.createXX(zLow, zHigh);
|
|
202413
202498
|
}
|
|
202414
202499
|
/** @internal */
|
|
@@ -202717,8 +202802,11 @@ class ViewClipByShapeTool extends ViewClipTool {
|
|
|
202717
202802
|
points.push(pt.clone());
|
|
202718
202803
|
if (undefined === this._matrix)
|
|
202719
202804
|
return points;
|
|
202805
|
+
const vp = ev.viewport;
|
|
202806
|
+
if (undefined === vp)
|
|
202807
|
+
return points;
|
|
202720
202808
|
const normal = this._matrix.getColumn(2);
|
|
202721
|
-
let currentPt = _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.projectPointToPlaneInView(ev.point, points[0], normal,
|
|
202809
|
+
let currentPt = _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.projectPointToPlaneInView(ev.point, points[0], normal, vp, true);
|
|
202722
202810
|
if (undefined === currentPt)
|
|
202723
202811
|
currentPt = ev.point.clone();
|
|
202724
202812
|
if (2 === points.length && !ev.isControlKey) {
|
|
@@ -202727,7 +202815,7 @@ class ViewClipByShapeTool extends ViewClipTool {
|
|
|
202727
202815
|
xDir.normalizeInPlace();
|
|
202728
202816
|
const yDir = xDir.crossProduct(normal);
|
|
202729
202817
|
yDir.normalizeInPlace();
|
|
202730
|
-
const cornerPt = _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.projectPointToLineInView(currentPt, points[1], yDir,
|
|
202818
|
+
const cornerPt = _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.projectPointToLineInView(currentPt, points[1], yDir, vp, true);
|
|
202731
202819
|
if (undefined !== cornerPt) {
|
|
202732
202820
|
points.push(cornerPt);
|
|
202733
202821
|
cornerPt.plusScaled(xDir, -xLen, currentPt);
|
|
@@ -202794,7 +202882,8 @@ class ViewClipByShapeTool extends ViewClipTool {
|
|
|
202794
202882
|
return _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.No;
|
|
202795
202883
|
const currPt = ev.point.clone();
|
|
202796
202884
|
if (this._points.length > 0) {
|
|
202797
|
-
const
|
|
202885
|
+
const vp = ev.viewport;
|
|
202886
|
+
const planePt = (vp ? _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.projectPointToPlaneInView(currPt, this._points[0], this._matrix.getColumn(2), vp, true) : undefined);
|
|
202798
202887
|
if (undefined !== planePt)
|
|
202799
202888
|
currPt.setFrom(planePt);
|
|
202800
202889
|
}
|
|
@@ -203320,6 +203409,8 @@ class ViewClipDecoration extends _EditManipulator__WEBPACK_IMPORTED_MODULE_7__.E
|
|
|
203320
203409
|
if (compressed.length < clipShape.polygon.length) {
|
|
203321
203410
|
clip = clip.clone();
|
|
203322
203411
|
clipShape = ViewClipTool.isSingleClipShape(clip);
|
|
203412
|
+
if (undefined === clipShape)
|
|
203413
|
+
return false;
|
|
203323
203414
|
clipShape.setPolygon(compressed);
|
|
203324
203415
|
this._clipView.view.setViewClip(clip);
|
|
203325
203416
|
}
|
|
@@ -203722,7 +203813,7 @@ class ViewClipDecoration extends _EditManipulator__WEBPACK_IMPORTED_MODULE_7__.E
|
|
|
203722
203813
|
if (this._clipView !== vp)
|
|
203723
203814
|
return;
|
|
203724
203815
|
if (undefined !== this._clipShape) {
|
|
203725
|
-
ViewClipTool.drawClipShape(context, this._clipShape, this._clipShapeExtents, _EditManipulator__WEBPACK_IMPORTED_MODULE_7__.EditManipulator.HandleUtils.adjustForBackgroundColor(_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ColorDef.white, vp), 3, this._clipId);
|
|
203816
|
+
ViewClipTool.drawClipShape(context, this._clipShape, this._clipShapeExtents ?? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range1d.createNull(), _EditManipulator__WEBPACK_IMPORTED_MODULE_7__.EditManipulator.HandleUtils.adjustForBackgroundColor(_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ColorDef.white, vp), 3, this._clipId);
|
|
203726
203817
|
}
|
|
203727
203818
|
else if (undefined !== this._clipPlanes) {
|
|
203728
203819
|
if (undefined !== this._clipPlanesLoops)
|
|
@@ -203767,9 +203858,12 @@ class ViewClipDecoration extends _EditManipulator__WEBPACK_IMPORTED_MODULE_7__.E
|
|
|
203767
203858
|
}
|
|
203768
203859
|
}
|
|
203769
203860
|
}
|
|
203770
|
-
else
|
|
203771
|
-
this._controls[iFace].
|
|
203772
|
-
|
|
203861
|
+
else {
|
|
203862
|
+
const floatingOrigin = this._controls[iFace].floatingOrigin;
|
|
203863
|
+
if (undefined !== floatingOrigin && vp.isPointVisibleXY(floatingOrigin, _CoordSystem__WEBPACK_IMPORTED_MODULE_4__.CoordSystem.World, 0.1)) {
|
|
203864
|
+
this._controls[iFace].origin.setFrom(this._controls[iFace].floatingOrigin);
|
|
203865
|
+
this._controls[iFace].floatingOrigin = undefined;
|
|
203866
|
+
}
|
|
203773
203867
|
}
|
|
203774
203868
|
}
|
|
203775
203869
|
const anchorRay = ViewClipTool.getClipRayTransformed(this._controls[iFace].origin, this._controls[iFace].direction, undefined !== this._clipShape ? this._clipShape.transformFromClip : undefined);
|
|
@@ -204336,6 +204430,8 @@ class ElementAgenda {
|
|
|
204336
204430
|
return;
|
|
204337
204431
|
}
|
|
204338
204432
|
const group = this.groupMarks.pop();
|
|
204433
|
+
if (undefined === group)
|
|
204434
|
+
return;
|
|
204339
204435
|
this.setEntriesHiliteState(false, group.start, this.length); // make sure removed entries aren't left hilited...
|
|
204340
204436
|
this.elements.splice(group.start);
|
|
204341
204437
|
}
|
|
@@ -205458,8 +205554,11 @@ class IdleTool extends _Tool__WEBPACK_IMPORTED_MODULE_1__.InteractiveTool {
|
|
|
205458
205554
|
return _Tool__WEBPACK_IMPORTED_MODULE_1__.EventHandled.Yes;
|
|
205459
205555
|
}
|
|
205460
205556
|
else if (ev.isDoubleTap) {
|
|
205557
|
+
const vp = ev.viewport;
|
|
205558
|
+
if (undefined === vp)
|
|
205559
|
+
return _Tool__WEBPACK_IMPORTED_MODULE_1__.EventHandled.No;
|
|
205461
205560
|
// Fit view on single finger double tap.
|
|
205462
|
-
const tool = new _ViewTool__WEBPACK_IMPORTED_MODULE_2__.FitViewTool(
|
|
205561
|
+
const tool = new _ViewTool__WEBPACK_IMPORTED_MODULE_2__.FitViewTool(vp, true);
|
|
205463
205562
|
return await tool.run() ? _Tool__WEBPACK_IMPORTED_MODULE_1__.EventHandled.Yes : _Tool__WEBPACK_IMPORTED_MODULE_1__.EventHandled.No;
|
|
205464
205563
|
}
|
|
205465
205564
|
return _Tool__WEBPACK_IMPORTED_MODULE_1__.EventHandled.No;
|
|
@@ -206032,7 +206131,8 @@ class MeasureDistanceTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Pr
|
|
|
206032
206131
|
if (undefined !== snap) {
|
|
206033
206132
|
if (undefined !== snap.primitive) {
|
|
206034
206133
|
const locDetail = snap.primitive.closestPoint(point, false);
|
|
206035
|
-
|
|
206134
|
+
const snapPlane = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Plane3dByOriginAndUnitNormal.create(point, undefined !== snap.normal ? snap.normal : normal);
|
|
206135
|
+
if (undefined !== locDetail && (_HitDetail__WEBPACK_IMPORTED_MODULE_5__.HitGeomType.Segment === snap.geomType || (snapPlane && snap.primitive.isInPlane(snapPlane)))) {
|
|
206036
206136
|
const locRay = snap.primitive.fractionToPointAndUnitTangent(locDetail.fraction);
|
|
206037
206137
|
tangent.setFrom(locRay.direction);
|
|
206038
206138
|
if (undefined !== snap.normal)
|
|
@@ -206552,7 +206652,8 @@ class MeasureAreaByPointsTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9_
|
|
|
206552
206652
|
return _Tool__WEBPACK_IMPORTED_MODULE_10__.EventHandled.No;
|
|
206553
206653
|
const currPt = ev.point.clone();
|
|
206554
206654
|
if (this._points.length > 0) {
|
|
206555
|
-
const
|
|
206655
|
+
const vp = ev.viewport;
|
|
206656
|
+
const planePt = (vp ? _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.projectPointToPlaneInView(currPt, this._points[0], this._matrix.getColumn(2), vp, true) : undefined);
|
|
206556
206657
|
if (undefined !== planePt)
|
|
206557
206658
|
currPt.setFrom(planePt);
|
|
206558
206659
|
}
|
|
@@ -207054,8 +207155,9 @@ class PrimitiveTool extends _Tool__WEBPACK_IMPORTED_MODULE_4__.InteractiveTool {
|
|
|
207054
207155
|
if (view.isSpatialView() && this.targetView.view.isSpatialView())
|
|
207055
207156
|
return true; // No specific target, two spatial views are considered compatible.
|
|
207056
207157
|
let allowView = false;
|
|
207158
|
+
const targetView = this.targetView;
|
|
207057
207159
|
view.forEachModel((model) => {
|
|
207058
|
-
if (!allowView &&
|
|
207160
|
+
if (!allowView && targetView.view.viewsModel(model.id))
|
|
207059
207161
|
allowView = true;
|
|
207060
207162
|
});
|
|
207061
207163
|
return allowView; // Accept if this view shares a model in common with target.
|
|
@@ -209012,11 +209114,15 @@ class CurrentInputState {
|
|
|
209012
209114
|
}
|
|
209013
209115
|
updateDownPoint(ev) { this.button[ev.button].downUorPt = ev.point; }
|
|
209014
209116
|
onButtonDown(button) {
|
|
209015
|
-
|
|
209016
|
-
const center = this.viewport.npcToView(_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.NpcCenter);
|
|
209017
|
-
viewPt.z = center.z;
|
|
209117
|
+
let isDoubleClick = false;
|
|
209018
209118
|
const now = Date.now();
|
|
209019
|
-
const
|
|
209119
|
+
const vp = this.viewport;
|
|
209120
|
+
if (undefined !== vp) {
|
|
209121
|
+
const viewPt = vp.worldToView(this.button[button].downRawPt);
|
|
209122
|
+
const center = vp.npcToView(_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.NpcCenter);
|
|
209123
|
+
viewPt.z = center.z;
|
|
209124
|
+
isDoubleClick = ((now - this.button[button].downTime) < _ToolSettings__WEBPACK_IMPORTED_MODULE_14__.ToolSettings.doubleClickTimeout.milliseconds) && (viewPt.distance(this.viewPoint) < vp.pixelsFromInches(_ToolSettings__WEBPACK_IMPORTED_MODULE_14__.ToolSettings.doubleClickToleranceInches));
|
|
209125
|
+
}
|
|
209020
209126
|
this.button[button].init(this.point, this.rawPoint, now, true, isDoubleClick, false, this.inputSource);
|
|
209021
209127
|
this.lastButton = button;
|
|
209022
209128
|
}
|
|
@@ -209095,10 +209201,13 @@ class CurrentInputState {
|
|
|
209095
209201
|
return false;
|
|
209096
209202
|
if ((Date.now() - state.downTime) <= _ToolSettings__WEBPACK_IMPORTED_MODULE_14__.ToolSettings.startDragDelay.milliseconds)
|
|
209097
209203
|
return false;
|
|
209098
|
-
const
|
|
209204
|
+
const vp = this.viewport;
|
|
209205
|
+
if (undefined === vp)
|
|
209206
|
+
return false;
|
|
209207
|
+
const viewPt = vp.worldToView(state.downRawPt);
|
|
209099
209208
|
const deltaX = Math.abs(this._viewPoint.x - viewPt.x);
|
|
209100
209209
|
const deltaY = Math.abs(this._viewPoint.y - viewPt.y);
|
|
209101
|
-
return ((deltaX + deltaY) >
|
|
209210
|
+
return ((deltaX + deltaY) > vp.pixelsFromInches(_ToolSettings__WEBPACK_IMPORTED_MODULE_14__.ToolSettings.startDragDistanceInches));
|
|
209102
209211
|
}
|
|
209103
209212
|
}
|
|
209104
209213
|
/** Controls the operation of [[Tool]]s, administering the current [[ViewTool]], [[PrimitiveTool]], and [[IdleTool]] and forwarding events to the appropriate tool.
|
|
@@ -209265,9 +209374,11 @@ class ToolAdmin {
|
|
|
209265
209374
|
ToolAdmin._toolEvents = ToolAdmin._toolEvents.filter((ev) => ev.vp !== vp);
|
|
209266
209375
|
}
|
|
209267
209376
|
getMousePosition(event) {
|
|
209377
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
209268
209378
|
return event.vp.mousePosFromEvent(event.ev);
|
|
209269
209379
|
}
|
|
209270
209380
|
getMouseMovement(event) {
|
|
209381
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
209271
209382
|
return event.vp.mouseMovementFromEvent(event.ev);
|
|
209272
209383
|
}
|
|
209273
209384
|
getMouseButton(button) {
|
|
@@ -209279,6 +209390,7 @@ class ToolAdmin {
|
|
|
209279
209390
|
}
|
|
209280
209391
|
async onMouseButton(event, isDown) {
|
|
209281
209392
|
const ev = event.ev;
|
|
209393
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
209282
209394
|
const vp = event.vp;
|
|
209283
209395
|
const pos = this.getMousePosition(event);
|
|
209284
209396
|
const button = this.getMouseButton(ev.button);
|
|
@@ -209288,7 +209400,7 @@ class ToolAdmin {
|
|
|
209288
209400
|
async onWheel(event) {
|
|
209289
209401
|
const ev = event.ev;
|
|
209290
209402
|
const vp = event.vp;
|
|
209291
|
-
if (this.filterViewport(vp))
|
|
209403
|
+
if (undefined === vp || this.filterViewport(vp))
|
|
209292
209404
|
return _Tool__WEBPACK_IMPORTED_MODULE_13__.EventHandled.Yes;
|
|
209293
209405
|
const current = this.currentInputState;
|
|
209294
209406
|
current.setKeyQualifiers(ev);
|
|
@@ -209321,7 +209433,9 @@ class ToolAdmin {
|
|
|
209321
209433
|
return _Tool__WEBPACK_IMPORTED_MODULE_13__.EventHandled.Yes;
|
|
209322
209434
|
}
|
|
209323
209435
|
async sendTapEvent(touchEv) {
|
|
209324
|
-
touchEv.viewport
|
|
209436
|
+
const vp = touchEv.viewport;
|
|
209437
|
+
if (undefined !== vp)
|
|
209438
|
+
vp.setAnimator();
|
|
209325
209439
|
const overlayHit = this.pickCanvasDecoration(touchEv);
|
|
209326
209440
|
if (undefined !== overlayHit && undefined !== overlayHit.onMouseButton && overlayHit.onMouseButton(touchEv))
|
|
209327
209441
|
return _Tool__WEBPACK_IMPORTED_MODULE_13__.EventHandled.Yes;
|
|
@@ -209348,7 +209462,7 @@ class ToolAdmin {
|
|
|
209348
209462
|
async onTouch(event) {
|
|
209349
209463
|
const touchEvent = event.ev;
|
|
209350
209464
|
const vp = event.vp;
|
|
209351
|
-
if (this.filterViewport(vp))
|
|
209465
|
+
if (undefined === vp || this.filterViewport(vp))
|
|
209352
209466
|
return;
|
|
209353
209467
|
const ev = new _Tool__WEBPACK_IMPORTED_MODULE_13__.BeTouchEvent({ touchEvent });
|
|
209354
209468
|
const current = this.currentInputState;
|
|
@@ -209487,6 +209601,7 @@ class ToolAdmin {
|
|
|
209487
209601
|
case "mouseup": return this.onMouseButton(event, false);
|
|
209488
209602
|
case "mousemove": return this.onMouseMove(event);
|
|
209489
209603
|
case "mouseover": return this.onMouseEnter(event);
|
|
209604
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
209490
209605
|
case "mouseout": return this.onMouseLeave(event.vp);
|
|
209491
209606
|
case "wheel": return this.onWheel(event);
|
|
209492
209607
|
case "keydown": return this.onKeyTransition(event, true);
|
|
@@ -209663,6 +209778,8 @@ class ToolAdmin {
|
|
|
209663
209778
|
}
|
|
209664
209779
|
pickCanvasDecoration(ev) {
|
|
209665
209780
|
const vp = ev.viewport;
|
|
209781
|
+
if (undefined === vp)
|
|
209782
|
+
return undefined;
|
|
209666
209783
|
const decoration = (undefined === this.viewTool) ? vp.pickCanvasDecoration(ev.viewPoint) : undefined;
|
|
209667
209784
|
this.setCanvasDecoration(vp, decoration, ev);
|
|
209668
209785
|
return decoration;
|
|
@@ -209788,6 +209905,8 @@ class ToolAdmin {
|
|
|
209788
209905
|
}
|
|
209789
209906
|
async onMouseMove(event) {
|
|
209790
209907
|
const vp = event.vp;
|
|
209908
|
+
if (undefined === vp)
|
|
209909
|
+
return;
|
|
209791
209910
|
const pos = this.getMousePosition(event);
|
|
209792
209911
|
const mov = this.getMouseMovement(event);
|
|
209793
209912
|
// Sometimes the mouse goes down in a view, but we lose focus while its down so we never receive the up event.
|
|
@@ -210339,30 +210458,48 @@ class ToolAdmin {
|
|
|
210339
210458
|
setAdjustedDataPoint(ev) { this.currentInputState.adjustLastDataPoint(ev); }
|
|
210340
210459
|
/** Can be called by tools that wish to emulate mouse button down/up events for onTouchTap. */
|
|
210341
210460
|
async convertTouchTapToButtonDownAndUp(ev, button = _Tool__WEBPACK_IMPORTED_MODULE_13__.BeButton.Data) {
|
|
210461
|
+
const vp = ev.viewport;
|
|
210462
|
+
if (undefined === vp)
|
|
210463
|
+
return;
|
|
210342
210464
|
const pt2d = ev.viewPoint;
|
|
210343
|
-
await this.onButtonDown(
|
|
210344
|
-
return this.onButtonUp(
|
|
210465
|
+
await this.onButtonDown(vp, pt2d, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
|
|
210466
|
+
return this.onButtonUp(vp, pt2d, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
|
|
210345
210467
|
}
|
|
210346
210468
|
/** Can be called by tools that wish to emulate moving the mouse with a button depressed for onTouchMoveStart.
|
|
210347
210469
|
* @note Calls the tool's onMouseStartDrag method from onMotion.
|
|
210348
210470
|
*/
|
|
210349
210471
|
async convertTouchMoveStartToButtonDownAndMotion(startEv, ev, button = _Tool__WEBPACK_IMPORTED_MODULE_13__.BeButton.Data) {
|
|
210350
|
-
|
|
210351
|
-
|
|
210472
|
+
const startVp = startEv.viewport;
|
|
210473
|
+
if (undefined === startVp)
|
|
210474
|
+
return;
|
|
210475
|
+
const vp = ev.viewport;
|
|
210476
|
+
if (undefined === vp)
|
|
210477
|
+
return;
|
|
210478
|
+
await this.onButtonDown(startVp, startEv.viewPoint, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
|
|
210479
|
+
return this.onMotion(vp, ev.viewPoint, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch, true);
|
|
210352
210480
|
}
|
|
210353
210481
|
/** Can be called by tools that wish to emulate pressing the mouse button for onTouchStart or onTouchMoveStart. */
|
|
210354
210482
|
async convertTouchStartToButtonDown(ev, button = _Tool__WEBPACK_IMPORTED_MODULE_13__.BeButton.Data) {
|
|
210355
|
-
|
|
210483
|
+
const vp = ev.viewport;
|
|
210484
|
+
if (undefined === vp)
|
|
210485
|
+
return;
|
|
210486
|
+
return this.onButtonDown(vp, ev.viewPoint, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
|
|
210356
210487
|
}
|
|
210357
210488
|
/** Can be called by tools that wish to emulate releasing the mouse button for onTouchEnd or onTouchComplete.
|
|
210358
210489
|
* @note Calls the tool's onMouseEndDrag method if convertTouchMoveStartToButtonDownAndMotion was called for onTouchMoveStart.
|
|
210359
210490
|
*/
|
|
210360
210491
|
async convertTouchEndToButtonUp(ev, button = _Tool__WEBPACK_IMPORTED_MODULE_13__.BeButton.Data) {
|
|
210361
|
-
|
|
210492
|
+
const vp = ev.viewport;
|
|
210493
|
+
if (undefined === vp)
|
|
210494
|
+
return;
|
|
210495
|
+
return this.onButtonUp(vp, ev.viewPoint, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
|
|
210362
210496
|
}
|
|
210363
210497
|
/** Can be called by tools that wish to emulate a mouse motion event for onTouchMove. */
|
|
210364
210498
|
async convertTouchMoveToMotion(ev) {
|
|
210365
|
-
|
|
210499
|
+
const vp = ev.viewport;
|
|
210500
|
+
if (undefined === vp)
|
|
210501
|
+
return;
|
|
210502
|
+
return this.onMotion(vp, ev.viewPoint, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
|
|
210366
210503
|
}
|
|
210367
210504
|
/** Can be called by tools to invoke their [[InteractiveTool.onDynamicFrame]] method without requiring a motion event. */
|
|
210368
210505
|
simulateMotionEvent() {
|
|
@@ -211067,11 +211204,13 @@ class ViewingToolHandle {
|
|
|
211067
211204
|
}
|
|
211068
211205
|
// if we have a valid depth point, set the focus distance to
|
|
211069
211206
|
changeFocusFromDepthPoint() {
|
|
211070
|
-
if (undefined
|
|
211071
|
-
|
|
211072
|
-
|
|
211073
|
-
|
|
211074
|
-
|
|
211207
|
+
if (undefined === this._depthPoint)
|
|
211208
|
+
return;
|
|
211209
|
+
const view = this.viewTool.viewport?.view;
|
|
211210
|
+
if (undefined === view)
|
|
211211
|
+
return;
|
|
211212
|
+
if (view.is3d() && view.isCameraOn)
|
|
211213
|
+
view.changeFocusFromPoint(this._depthPoint); // set the focus distance to the depth point
|
|
211075
211214
|
}
|
|
211076
211215
|
}
|
|
211077
211216
|
/** @internal */
|
|
@@ -211561,11 +211700,15 @@ class ViewManip extends ViewTool {
|
|
|
211561
211700
|
return inDynamics || (doUpdate && hitHandle.checkOneShot());
|
|
211562
211701
|
}
|
|
211563
211702
|
lensAngleMatches(angle, tolerance) {
|
|
211564
|
-
const cameraView = this.viewport
|
|
211703
|
+
const cameraView = this.viewport?.view;
|
|
211704
|
+
if (undefined === cameraView)
|
|
211705
|
+
return false;
|
|
211565
211706
|
return !cameraView.is3d() ? false : Math.abs(cameraView.calcLensAngle().radians - angle.radians) < tolerance;
|
|
211566
211707
|
}
|
|
211567
211708
|
get isZUp() {
|
|
211568
|
-
const view = this.viewport
|
|
211709
|
+
const view = this.viewport?.view;
|
|
211710
|
+
if (undefined === view)
|
|
211711
|
+
return true;
|
|
211569
211712
|
const viewX = view.getXVector();
|
|
211570
211713
|
const viewY = view.getXVector();
|
|
211571
211714
|
const zVec = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ();
|
|
@@ -211708,9 +211851,12 @@ class ViewTargetCenter extends ViewingToolHandle {
|
|
|
211708
211851
|
testHandleForHit(ptScreen, out) {
|
|
211709
211852
|
if (this.viewTool.isDraggingRequired)
|
|
211710
211853
|
return false; // Target center handle is not movable in this mode, but it's still nice to display the point we're rotating about...
|
|
211711
|
-
const
|
|
211854
|
+
const vp = this.viewTool.viewport;
|
|
211855
|
+
if (undefined === vp)
|
|
211856
|
+
return false;
|
|
211857
|
+
const targetPt = vp.worldToView(this.viewTool.targetCenterWorld);
|
|
211712
211858
|
const distance = targetPt.distanceXY(ptScreen);
|
|
211713
|
-
const locateThreshold =
|
|
211859
|
+
const locateThreshold = vp.pixelsFromInches(0.15);
|
|
211714
211860
|
if (distance > locateThreshold)
|
|
211715
211861
|
return false;
|
|
211716
211862
|
out.distance = distance;
|
|
@@ -211787,7 +211933,10 @@ class HandleWithInertia extends ViewingToolHandle {
|
|
|
211787
211933
|
doManipulation(ev, inDynamics) {
|
|
211788
211934
|
if (_ToolSettings__WEBPACK_IMPORTED_MODULE_20__.ToolSettings.viewingInertia.enabled && !inDynamics && undefined !== this._inertiaVec)
|
|
211789
211935
|
return this.beginAnimation();
|
|
211790
|
-
const
|
|
211936
|
+
const vp = ev.viewport;
|
|
211937
|
+
if (undefined === vp)
|
|
211938
|
+
return false;
|
|
211939
|
+
const thisPtNpc = vp.worldToNpc(ev.point);
|
|
211791
211940
|
thisPtNpc.z = this._lastPtNpc.z;
|
|
211792
211941
|
this._inertiaVec = undefined;
|
|
211793
211942
|
if (this._lastPtNpc.isAlmostEqual(thisPtNpc, 1.0e-10))
|
|
@@ -211800,7 +211949,9 @@ class HandleWithInertia extends ViewingToolHandle {
|
|
|
211800
211949
|
this._duration = _ToolSettings__WEBPACK_IMPORTED_MODULE_20__.ToolSettings.viewingInertia.duration;
|
|
211801
211950
|
if (this._duration.isTowardsFuture) { // ensure duration is towards future. Otherwise, don't start animation
|
|
211802
211951
|
this._end = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeTimePoint.fromNow(this._duration);
|
|
211803
|
-
this.viewTool.viewport
|
|
211952
|
+
const vp = this.viewTool.viewport;
|
|
211953
|
+
if (undefined !== vp)
|
|
211954
|
+
vp.setAnimator(this);
|
|
211804
211955
|
}
|
|
211805
211956
|
return true;
|
|
211806
211957
|
}
|
|
@@ -211814,7 +211965,10 @@ class HandleWithInertia extends ViewingToolHandle {
|
|
|
211814
211965
|
const pt = this._lastPtNpc.plusScaled(this._inertiaVec, remaining);
|
|
211815
211966
|
// if we're not moving any more, or if the duration has elapsed, we're done
|
|
211816
211967
|
if (remaining <= 0 || (this._lastPtNpc.minus(pt).magnitudeSquared() < .000001)) {
|
|
211817
|
-
this.viewTool.viewport
|
|
211968
|
+
const vp = this.viewTool.viewport;
|
|
211969
|
+
if (undefined === vp)
|
|
211970
|
+
return false;
|
|
211971
|
+
vp.saveViewUndo();
|
|
211818
211972
|
return true; // remove this as the animator
|
|
211819
211973
|
}
|
|
211820
211974
|
this.perform(pt); // perform the viewing operation
|
|
@@ -211828,10 +211982,12 @@ class ViewPan extends HandleWithInertia {
|
|
|
211828
211982
|
get handleType() { return ViewHandleType.Pan; }
|
|
211829
211983
|
getHandleCursor() { return this.viewTool.inHandleModify ? _IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.viewManager.grabbingCursor : _IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.viewManager.grabCursor; }
|
|
211830
211984
|
firstPoint(ev) {
|
|
211985
|
+
this._inertiaVec = undefined;
|
|
211831
211986
|
const tool = this.viewTool;
|
|
211832
211987
|
const vp = tool.viewport;
|
|
211988
|
+
if (undefined === vp)
|
|
211989
|
+
return false;
|
|
211833
211990
|
vp.worldToNpc(ev.point, this._lastPtNpc);
|
|
211834
|
-
this._inertiaVec = undefined;
|
|
211835
211991
|
// if the camera is on, we need to find the element under the starting point to get the z
|
|
211836
211992
|
if (this.needDepthPoint(ev, false)) {
|
|
211837
211993
|
this.pickDepthPoint(ev);
|
|
@@ -211853,6 +212009,8 @@ class ViewPan extends HandleWithInertia {
|
|
|
211853
212009
|
perform(thisPtNpc) {
|
|
211854
212010
|
const tool = this.viewTool;
|
|
211855
212011
|
const vp = tool.viewport;
|
|
212012
|
+
if (undefined === vp)
|
|
212013
|
+
return false;
|
|
211856
212014
|
const view = vp.view;
|
|
211857
212015
|
const lastWorld = vp.npcToWorld(this._lastPtNpc);
|
|
211858
212016
|
const thisWorld = vp.npcToWorld(thisPtNpc);
|
|
@@ -211871,7 +212029,10 @@ class ViewPan extends HandleWithInertia {
|
|
|
211871
212029
|
}
|
|
211872
212030
|
/** @internal */
|
|
211873
212031
|
needDepthPoint(ev, _isPreview) {
|
|
211874
|
-
|
|
212032
|
+
const vp = ev.viewport;
|
|
212033
|
+
if (undefined === vp)
|
|
212034
|
+
return false;
|
|
212035
|
+
return vp.isCameraOn && _Tool__WEBPACK_IMPORTED_MODULE_18__.CoordSource.User === ev.coordsFrom;
|
|
211875
212036
|
}
|
|
211876
212037
|
}
|
|
211877
212038
|
/** ViewingToolHandle for performing the "rotate view" operation */
|
|
@@ -211890,6 +212051,8 @@ class ViewRotate extends HandleWithInertia {
|
|
|
211890
212051
|
this._inertiaVec = undefined;
|
|
211891
212052
|
const tool = this.viewTool;
|
|
211892
212053
|
const vp = ev.viewport;
|
|
212054
|
+
if (undefined === vp)
|
|
212055
|
+
return false;
|
|
211893
212056
|
this.pickDepthPoint(ev);
|
|
211894
212057
|
if (undefined !== this._depthPoint)
|
|
211895
212058
|
tool.setTargetCenterWorld(this._depthPoint, false, false);
|
|
@@ -211904,6 +212067,8 @@ class ViewRotate extends HandleWithInertia {
|
|
|
211904
212067
|
perform(ptNpc) {
|
|
211905
212068
|
const tool = this.viewTool;
|
|
211906
212069
|
const vp = tool.viewport;
|
|
212070
|
+
if (undefined === vp)
|
|
212071
|
+
return false;
|
|
211907
212072
|
if (this._anchorPtNpc.isAlmostEqual(ptNpc, 1.0e-2)) // too close to anchor pt
|
|
211908
212073
|
ptNpc.setFrom(this._anchorPtNpc);
|
|
211909
212074
|
const currentFrustum = vp.getFrustum(_CoordSystem__WEBPACK_IMPORTED_MODULE_6__.CoordSystem.World, false);
|
|
@@ -211939,8 +212104,8 @@ class ViewRotate extends HandleWithInertia {
|
|
|
211939
212104
|
const xAxis = _ToolSettings__WEBPACK_IMPORTED_MODULE_20__.ToolSettings.preserveWorldUp && !vp.viewingGlobe ? (undefined !== this._depthPoint ? vp.view.getUpVector(this._depthPoint) : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ()) : vp.rotation.getRow(1);
|
|
211940
212105
|
// Movement in screen y == rotation about screen X...
|
|
211941
212106
|
const yAxis = vp.rotation.getRow(0);
|
|
211942
|
-
const xRMatrix = xDelta ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(xAxis, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(Math.PI / (viewRect.width / xDelta))) : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity;
|
|
211943
|
-
const yRMatrix = yDelta ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(yAxis, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(Math.PI / (viewRect.height / yDelta))) : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity;
|
|
212107
|
+
const xRMatrix = (xDelta ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(xAxis, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(Math.PI / (viewRect.width / xDelta))) : undefined) ?? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity;
|
|
212108
|
+
const yRMatrix = (yDelta ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(yAxis, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(Math.PI / (viewRect.height / yDelta))) : undefined) ?? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity;
|
|
211944
212109
|
const worldRMatrix = yRMatrix.multiplyMatrixMatrix(xRMatrix);
|
|
211945
212110
|
const result = worldRMatrix.getAxisAndAngleOfRotation();
|
|
211946
212111
|
angle = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(-result.angle.radians);
|
|
@@ -211971,11 +212136,14 @@ class ViewRotate extends HandleWithInertia {
|
|
|
211971
212136
|
}
|
|
211972
212137
|
/** @internal */
|
|
211973
212138
|
needDepthPoint(ev, _isPreview) {
|
|
211974
|
-
|
|
212139
|
+
const vp = ev.viewport;
|
|
212140
|
+
if (undefined === vp)
|
|
212141
|
+
return false;
|
|
212142
|
+
return (!this.viewTool.targetCenterLocked && vp.view.allow3dManipulations());
|
|
211975
212143
|
}
|
|
211976
212144
|
/** @internal */
|
|
211977
212145
|
adjustDepthPoint(isValid, vp, plane, source) {
|
|
211978
|
-
if (vp.viewingGlobe && this.viewTool.isPointVisible(vp.iModel.ecefLocation.earthCenter)) {
|
|
212146
|
+
if (vp.viewingGlobe && vp.iModel.ecefLocation && this.viewTool.isPointVisible(vp.iModel.ecefLocation.earthCenter)) {
|
|
211979
212147
|
plane.getOriginRef().setFrom(vp.iModel.ecefLocation.earthCenter);
|
|
211980
212148
|
plane.getNormalRef().setFrom(vp.view.getZVector());
|
|
211981
212149
|
return true;
|
|
@@ -212002,6 +212170,8 @@ class ViewLook extends ViewingToolHandle {
|
|
|
212002
212170
|
firstPoint(ev) {
|
|
212003
212171
|
const tool = this.viewTool;
|
|
212004
212172
|
const vp = ev.viewport;
|
|
212173
|
+
if (undefined === vp)
|
|
212174
|
+
return true;
|
|
212005
212175
|
const view = vp.view;
|
|
212006
212176
|
if (!view || !view.is3d() || !view.allow3dManipulations())
|
|
212007
212177
|
return false;
|
|
@@ -212026,11 +212196,13 @@ class ViewLook extends ViewingToolHandle {
|
|
|
212026
212196
|
doManipulation(ev, _inDynamics) {
|
|
212027
212197
|
const tool = this.viewTool;
|
|
212028
212198
|
const viewport = tool.viewport;
|
|
212199
|
+
if (undefined === viewport)
|
|
212200
|
+
return false;
|
|
212029
212201
|
if (ev.viewport !== viewport)
|
|
212030
212202
|
return false;
|
|
212031
212203
|
const worldTransform = this.getLookTransform(viewport, this._firstPtView, ev.viewPoint);
|
|
212032
212204
|
const frustum = this._frustum.transformBy(worldTransform);
|
|
212033
|
-
|
|
212205
|
+
viewport.setupViewFromFrustum(frustum);
|
|
212034
212206
|
return true;
|
|
212035
212207
|
}
|
|
212036
212208
|
getLookTransform(vp, firstPt, currPt) {
|
|
@@ -212103,7 +212275,8 @@ class AnimatedHandle extends ViewingToolHandle {
|
|
|
212103
212275
|
}
|
|
212104
212276
|
this._lastPtView.setFrom(this._anchorPtView);
|
|
212105
212277
|
this._lastMotionTime = Date.now();
|
|
212106
|
-
tool.viewport
|
|
212278
|
+
if (undefined !== tool.viewport)
|
|
212279
|
+
tool.viewport.setAnimator(this);
|
|
212107
212280
|
return true;
|
|
212108
212281
|
}
|
|
212109
212282
|
getDirection() {
|
|
@@ -212112,10 +212285,13 @@ class AnimatedHandle extends ViewingToolHandle {
|
|
|
212112
212285
|
return dir.magnitudeSquared() < this._deadZone ? undefined : dir; // dead zone around starting point
|
|
212113
212286
|
}
|
|
212114
212287
|
getInputVector() {
|
|
212288
|
+
const vp = this.viewTool.viewport;
|
|
212289
|
+
if (undefined === vp)
|
|
212290
|
+
return undefined;
|
|
212115
212291
|
const dir = this.getDirection();
|
|
212116
212292
|
if (undefined === dir)
|
|
212117
212293
|
return undefined;
|
|
212118
|
-
const viewRect =
|
|
212294
|
+
const viewRect = vp.viewRect;
|
|
212119
212295
|
return new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d(dir.x * (2.0 / viewRect.width), dir.y * (2.0 / viewRect.height));
|
|
212120
212296
|
}
|
|
212121
212297
|
onReinitialize() {
|
|
@@ -212191,6 +212367,8 @@ class ViewScroll extends AnimatedHandle {
|
|
|
212191
212367
|
dist.scaleInPlace(_ToolSettings__WEBPACK_IMPORTED_MODULE_20__.ToolSettings.scrollSpeed * this.getElapsedTime());
|
|
212192
212368
|
const tool = this.viewTool;
|
|
212193
212369
|
const viewport = tool.viewport;
|
|
212370
|
+
if (undefined === viewport)
|
|
212371
|
+
return false;
|
|
212194
212372
|
if (viewport.isCameraOn) {
|
|
212195
212373
|
const points = new Array(2);
|
|
212196
212374
|
points[0] = this._anchorPtView.clone();
|
|
@@ -212211,7 +212389,10 @@ class ViewScroll extends AnimatedHandle {
|
|
|
212211
212389
|
}
|
|
212212
212390
|
/** @internal */
|
|
212213
212391
|
needDepthPoint(ev, _isPreview) {
|
|
212214
|
-
|
|
212392
|
+
const vp = ev.viewport;
|
|
212393
|
+
if (undefined === vp)
|
|
212394
|
+
return false;
|
|
212395
|
+
return vp.isCameraOn && _Tool__WEBPACK_IMPORTED_MODULE_18__.CoordSource.User === ev.coordsFrom;
|
|
212215
212396
|
}
|
|
212216
212397
|
}
|
|
212217
212398
|
/** ViewingToolHandle for performing the "zoom view" operation */
|
|
@@ -212261,6 +212442,8 @@ class ViewZoom extends ViewingToolHandle {
|
|
|
212261
212442
|
}
|
|
212262
212443
|
firstPoint(ev) {
|
|
212263
212444
|
const vp = ev.viewport;
|
|
212445
|
+
if (undefined === vp)
|
|
212446
|
+
return false;
|
|
212264
212447
|
this.viewTool.inDynamicUpdate = true;
|
|
212265
212448
|
if (this.needDepthPoint(ev, false)) {
|
|
212266
212449
|
this.pickDepthPoint(ev);
|
|
@@ -212305,6 +212488,8 @@ class ViewZoom extends ViewingToolHandle {
|
|
|
212305
212488
|
if (undefined === this._startFrust || undefined === this.getDirection()) // on anchor point?
|
|
212306
212489
|
return false;
|
|
212307
212490
|
const viewport = this.viewTool.viewport;
|
|
212491
|
+
if (undefined === viewport)
|
|
212492
|
+
return false;
|
|
212308
212493
|
const view = viewport.view;
|
|
212309
212494
|
const thisPtNpc = viewport.viewToNpc(this._lastPtView);
|
|
212310
212495
|
const dist = this._anchorPtNpc.minus(thisPtNpc);
|
|
@@ -212331,7 +212516,10 @@ class ViewZoom extends ViewingToolHandle {
|
|
|
212331
212516
|
}
|
|
212332
212517
|
/** @internal */
|
|
212333
212518
|
needDepthPoint(ev, _isPreview) {
|
|
212334
|
-
|
|
212519
|
+
const vp = ev.viewport;
|
|
212520
|
+
if (undefined === vp)
|
|
212521
|
+
return false;
|
|
212522
|
+
return vp.isCameraOn && _Tool__WEBPACK_IMPORTED_MODULE_18__.CoordSource.User === ev.coordsFrom;
|
|
212335
212523
|
}
|
|
212336
212524
|
}
|
|
212337
212525
|
/** @internal */
|
|
@@ -212395,11 +212583,17 @@ class NavigateMotion {
|
|
|
212395
212583
|
const yAngle = -(accumulator.y / yExtent) * Math.PI;
|
|
212396
212584
|
const viewRot = vp.rotation;
|
|
212397
212585
|
const invViewRot = viewRot.inverse();
|
|
212586
|
+
if (undefined === invViewRot)
|
|
212587
|
+
return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
|
|
212398
212588
|
const pitchAngle = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(this.modifyPitchAngleToPreventInversion(yAngle));
|
|
212399
212589
|
const pitchMatrix = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitX(), pitchAngle);
|
|
212590
|
+
if (undefined === pitchMatrix)
|
|
212591
|
+
return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
|
|
212400
212592
|
const pitchTimesView = pitchMatrix.multiplyMatrixMatrix(viewRot);
|
|
212401
212593
|
const inverseViewTimesPitchTimesView = invViewRot.multiplyMatrixMatrix(pitchTimesView);
|
|
212402
212594
|
const yawMatrix = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ(), _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(xAngle));
|
|
212595
|
+
if (undefined === yawMatrix)
|
|
212596
|
+
return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
|
|
212403
212597
|
const yawTimesInverseViewTimesPitchTimesView = yawMatrix.multiplyMatrixMatrix(inverseViewTimesPitchTimesView);
|
|
212404
212598
|
return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createFixedPointAndMatrix(view.getEyePoint(), yawTimesInverseViewTimesPitchTimesView, result);
|
|
212405
212599
|
}
|
|
@@ -212410,11 +212604,17 @@ class NavigateMotion {
|
|
|
212410
212604
|
return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
|
|
212411
212605
|
const viewRot = vp.rotation;
|
|
212412
212606
|
const invViewRot = viewRot.inverse();
|
|
212607
|
+
if (undefined === invViewRot)
|
|
212608
|
+
return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
|
|
212413
212609
|
const pitchAngle = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(this.modifyPitchAngleToPreventInversion(pitchRate * this._seconds));
|
|
212414
212610
|
const pitchMatrix = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitX(), pitchAngle);
|
|
212611
|
+
if (undefined === pitchMatrix)
|
|
212612
|
+
return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
|
|
212415
212613
|
const pitchTimesView = pitchMatrix.multiplyMatrixMatrix(viewRot);
|
|
212416
212614
|
const inverseViewTimesPitchTimesView = invViewRot.multiplyMatrixMatrix(pitchTimesView);
|
|
212417
212615
|
const yawMatrix = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ(), _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(yawRate * this._seconds));
|
|
212616
|
+
if (undefined === yawMatrix)
|
|
212617
|
+
return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
|
|
212418
212618
|
const yawTimesInverseViewTimesPitchTimesView = yawMatrix.multiplyMatrixMatrix(inverseViewTimesPitchTimesView);
|
|
212419
212619
|
return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createFixedPointAndMatrix(view.getEyePoint(), yawTimesInverseViewTimesPitchTimesView, result);
|
|
212420
212620
|
}
|
|
@@ -212472,6 +212672,8 @@ class NavigateMotion {
|
|
|
212472
212672
|
if (!view.is3d() || !view.isCameraOn)
|
|
212473
212673
|
return;
|
|
212474
212674
|
const angles = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.YawPitchRollAngles.createFromMatrix3d(this.viewport.rotation);
|
|
212675
|
+
if (undefined === angles)
|
|
212676
|
+
return;
|
|
212475
212677
|
angles.pitch.setRadians(0); // reset pitch to zero
|
|
212476
212678
|
_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createFixedPointAndMatrix(view.getEyePoint(), angles.toMatrix3d(), this.transform);
|
|
212477
212679
|
}
|
|
@@ -212484,7 +212686,7 @@ class ViewNavigate extends AnimatedHandle {
|
|
|
212484
212686
|
getMaxAngularVelocity() { return Math.PI / 4; }
|
|
212485
212687
|
getNavigateMode() {
|
|
212486
212688
|
const state = _IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.toolAdmin.currentInputState;
|
|
212487
|
-
return (state.isShiftDown ||
|
|
212689
|
+
return (state.isShiftDown || (false === this.viewTool.viewport?.isCameraOn)) ? 0 /* NavigateMode.Pan */ :
|
|
212488
212690
|
state.isControlDown ? 1 /* NavigateMode.Look */ : 2 /* NavigateMode.Travel */;
|
|
212489
212691
|
}
|
|
212490
212692
|
// called in animation loop
|
|
@@ -212494,6 +212696,8 @@ class ViewNavigate extends AnimatedHandle {
|
|
|
212494
212696
|
const motion = this.getNavigateMotion(this.getElapsedTime());
|
|
212495
212697
|
if (undefined !== motion) {
|
|
212496
212698
|
const vp = this.viewTool.viewport;
|
|
212699
|
+
if (undefined === vp)
|
|
212700
|
+
return false;
|
|
212497
212701
|
const frust = vp.getWorldFrustum();
|
|
212498
212702
|
frust.multiply(motion.transform);
|
|
212499
212703
|
vp.setupViewFromFrustum(frust);
|
|
@@ -212565,6 +212769,7 @@ class ViewLookAndMove extends ViewNavigate {
|
|
|
212565
212769
|
_pointerLockKeyEngagementListener;
|
|
212566
212770
|
constructor(viewManip) {
|
|
212567
212771
|
super(viewManip);
|
|
212772
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
212568
212773
|
this._navigateMotion = new NavigateMotion(this.viewTool.viewport);
|
|
212569
212774
|
}
|
|
212570
212775
|
get handleType() { return ViewHandleType.LookAndMove; }
|
|
@@ -212687,10 +212892,10 @@ class ViewLookAndMove extends ViewNavigate {
|
|
|
212687
212892
|
getMaxAngularVelocityY() { return this.getMaxAngularVelocity(); }
|
|
212688
212893
|
getLinearVelocity() {
|
|
212689
212894
|
const positionInput = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
212690
|
-
const vp = this.viewTool.viewport;
|
|
212691
212895
|
const position = this.getTouchStartPosition(this._touchStartL);
|
|
212692
212896
|
if (undefined !== position) {
|
|
212693
|
-
const
|
|
212897
|
+
const vp = this.viewTool.viewport;
|
|
212898
|
+
const outerRadius = vp ? this.getTouchControlRadius(vp) : 1;
|
|
212694
212899
|
const offset = this.getTouchOffset(this._touchStartL, outerRadius);
|
|
212695
212900
|
const inputL = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d(offset.x * (1.0 / outerRadius), offset.y * (1.0 / outerRadius));
|
|
212696
212901
|
positionInput.x = inputL.x * this.getMaxLinearVelocity();
|
|
@@ -212705,10 +212910,10 @@ class ViewLookAndMove extends ViewNavigate {
|
|
|
212705
212910
|
}
|
|
212706
212911
|
getAngularVelocity() {
|
|
212707
212912
|
const angularInput = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
|
|
212708
|
-
const vp = this.viewTool.viewport;
|
|
212709
212913
|
const position = this.getTouchStartPosition(this._touchStartR);
|
|
212710
212914
|
if (undefined !== position) {
|
|
212711
|
-
const
|
|
212915
|
+
const vp = this.viewTool.viewport;
|
|
212916
|
+
const outerRadius = vp ? this.getTouchControlRadius(vp) : 1;
|
|
212712
212917
|
const offset = this.getTouchOffset(this._touchStartR, outerRadius);
|
|
212713
212918
|
const inputA = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d(offset.x * (1.0 / outerRadius), offset.y * (1.0 / outerRadius));
|
|
212714
212919
|
angularInput.x = inputA.x * -this.getMaxAngularVelocityX();
|
|
@@ -212961,7 +213166,8 @@ class ViewLookAndMove extends ViewNavigate {
|
|
|
212961
213166
|
if (tool.inDynamicUpdate)
|
|
212962
213167
|
return;
|
|
212963
213168
|
tool.changeViewport(vp);
|
|
212964
|
-
tool.viewport
|
|
213169
|
+
if (undefined !== tool.viewport)
|
|
213170
|
+
tool.viewport.setAnimator(this);
|
|
212965
213171
|
tool.inDynamicUpdate = true;
|
|
212966
213172
|
tool.inHandleModify = true;
|
|
212967
213173
|
vp.npcToView(_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.NpcCenter, this._anchorPtView);
|
|
@@ -213126,6 +213332,8 @@ class ViewLookAndMove extends ViewNavigate {
|
|
|
213126
213332
|
const position = this.getTouchStartPosition(touchStart);
|
|
213127
213333
|
if (undefined === position)
|
|
213128
213334
|
return offset;
|
|
213335
|
+
if (undefined === touchStart?.viewport)
|
|
213336
|
+
return offset;
|
|
213129
213337
|
const lastTouch = _Tool__WEBPACK_IMPORTED_MODULE_18__.BeTouchEvent.findTouchById(this._touchLast.touchEvent.targetTouches, touchStart.touchEvent.changedTouches[0].identifier);
|
|
213130
213338
|
if (undefined === lastTouch)
|
|
213131
213339
|
return offset;
|
|
@@ -213341,6 +213549,7 @@ class ViewWalk extends ViewNavigate {
|
|
|
213341
213549
|
_navigateMotion;
|
|
213342
213550
|
constructor(viewManip) {
|
|
213343
213551
|
super(viewManip);
|
|
213552
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
213344
213553
|
this._navigateMotion = new NavigateMotion(this.viewTool.viewport);
|
|
213345
213554
|
}
|
|
213346
213555
|
get handleType() { return ViewHandleType.Walk; }
|
|
@@ -213375,6 +213584,7 @@ class ViewFly extends ViewNavigate {
|
|
|
213375
213584
|
_navigateMotion;
|
|
213376
213585
|
constructor(viewManip) {
|
|
213377
213586
|
super(viewManip);
|
|
213587
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
213378
213588
|
this._navigateMotion = new NavigateMotion(this.viewTool.viewport);
|
|
213379
213589
|
}
|
|
213380
213590
|
get handleType() { return ViewHandleType.Fly; }
|
|
@@ -213941,6 +214151,8 @@ class WindowAreaTool extends ViewTool {
|
|
|
213941
214151
|
}
|
|
213942
214152
|
computeWindowCorners() {
|
|
213943
214153
|
const vp = this.viewport;
|
|
214154
|
+
if (undefined === vp)
|
|
214155
|
+
return undefined;
|
|
213944
214156
|
const corners = this._corners;
|
|
213945
214157
|
corners[0].setFrom(this._firstPtWorld);
|
|
213946
214158
|
corners[1].setFrom(this._secondPtWorld);
|
|
@@ -214029,13 +214241,15 @@ class WindowAreaTool extends ViewTool {
|
|
|
214029
214241
|
const corners = this.computeWindowCorners();
|
|
214030
214242
|
if (undefined === corners)
|
|
214031
214243
|
return;
|
|
214032
|
-
let delta;
|
|
214033
214244
|
const vp = this.viewport;
|
|
214245
|
+
if (undefined === vp)
|
|
214246
|
+
return;
|
|
214034
214247
|
const view = vp.view;
|
|
214035
214248
|
vp.viewToWorldArray(corners);
|
|
214036
214249
|
const opts = {
|
|
214037
214250
|
onExtentsError: (stat) => view.outputStatusMessage(stat),
|
|
214038
214251
|
};
|
|
214252
|
+
let delta;
|
|
214039
214253
|
let globalAlignment;
|
|
214040
214254
|
if (view.is3d() && view.isCameraOn) {
|
|
214041
214255
|
const windowArray = [corners[0].clone(), corners[1].clone()];
|
|
@@ -214107,7 +214321,10 @@ class DefaultViewTouchTool extends ViewManip {
|
|
|
214107
214321
|
const vec = this._lastPtView.minus(pt);
|
|
214108
214322
|
// if we're not moving any more, or if the duration has elapsed, we're done
|
|
214109
214323
|
if (remaining <= 0 || (vec.magnitudeSquared() < .000001)) {
|
|
214110
|
-
this.viewport
|
|
214324
|
+
const vp = this.viewport;
|
|
214325
|
+
if (undefined === vp)
|
|
214326
|
+
return false;
|
|
214327
|
+
vp.saveViewUndo();
|
|
214111
214328
|
return true; // remove this as the animator
|
|
214112
214329
|
}
|
|
214113
214330
|
this._lastPtView.setFrom(pt);
|
|
@@ -214123,6 +214340,8 @@ class DefaultViewTouchTool extends ViewManip {
|
|
|
214123
214340
|
}
|
|
214124
214341
|
onStart(ev) {
|
|
214125
214342
|
const vp = this.viewport;
|
|
214343
|
+
if (undefined === vp)
|
|
214344
|
+
return;
|
|
214126
214345
|
vp.getWorldFrustum(this._frustum);
|
|
214127
214346
|
const visiblePoint = vp.pickNearestVisibleGeometry(ev.rawPoint);
|
|
214128
214347
|
if (undefined !== visiblePoint) {
|
|
@@ -214145,8 +214364,10 @@ class DefaultViewTouchTool extends ViewManip {
|
|
|
214145
214364
|
if (undefined === ev || 0.0 === this._startDistance)
|
|
214146
214365
|
return 1.0;
|
|
214147
214366
|
const vp = this.viewport;
|
|
214367
|
+
if (undefined === vp)
|
|
214368
|
+
return 1.0;
|
|
214148
214369
|
const distance = (2 === ev.touchCount ? _Tool__WEBPACK_IMPORTED_MODULE_18__.BeTouchEvent.getTouchPosition(ev.touchEvent.targetTouches[0], vp).distance(_Tool__WEBPACK_IMPORTED_MODULE_18__.BeTouchEvent.getTouchPosition(ev.touchEvent.targetTouches[1], vp)) : 0.0);
|
|
214149
|
-
const threshold =
|
|
214370
|
+
const threshold = vp.pixelsFromInches(_ToolSettings__WEBPACK_IMPORTED_MODULE_20__.ToolSettings.touchZoomChangeThresholdInches);
|
|
214150
214371
|
if (0.0 === distance || Math.abs(this._startDistance - distance) < threshold)
|
|
214151
214372
|
return 1.0;
|
|
214152
214373
|
// Remove inertia if the viewing operation includes zoom, only use it for pan and rotate.
|
|
@@ -214158,6 +214379,8 @@ class DefaultViewTouchTool extends ViewManip {
|
|
|
214158
214379
|
if (undefined === ev || ev.touchCount < 2 || this._rotate2dDisabled)
|
|
214159
214380
|
return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createDegrees(0.0);
|
|
214160
214381
|
const vp = this.viewport;
|
|
214382
|
+
if (undefined === vp)
|
|
214383
|
+
return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createDegrees(0.0);
|
|
214161
214384
|
const direction = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector2d.createStartEnd(_Tool__WEBPACK_IMPORTED_MODULE_18__.BeTouchEvent.getTouchPosition(ev.touchEvent.targetTouches[0], vp), _Tool__WEBPACK_IMPORTED_MODULE_18__.BeTouchEvent.getTouchPosition(ev.touchEvent.targetTouches[1], vp));
|
|
214162
214385
|
const rotation = this._startDirection.angleTo(direction);
|
|
214163
214386
|
if (undefined === this._rotate2dThreshold) {
|
|
@@ -214177,15 +214400,18 @@ class DefaultViewTouchTool extends ViewManip {
|
|
|
214177
214400
|
}
|
|
214178
214401
|
handle2dPan() {
|
|
214179
214402
|
const screenDist = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.create(this._startPtView.x - this._lastPtView.x, this._startPtView.y - this._lastPtView.y);
|
|
214180
|
-
this.viewport
|
|
214403
|
+
if (undefined !== this.viewport)
|
|
214404
|
+
this.viewport.scroll(screenDist, { noSaveInUndo: true });
|
|
214181
214405
|
}
|
|
214182
214406
|
handle2dRotateZoom(ev) {
|
|
214183
214407
|
const vp = this.viewport;
|
|
214408
|
+
if (undefined === vp)
|
|
214409
|
+
return;
|
|
214184
214410
|
const rotation = this.computeRotation(ev);
|
|
214185
214411
|
const zoomRatio = this.computeZoomRatio(ev);
|
|
214186
214412
|
const targetWorld = vp.viewToWorld(this._lastPtView);
|
|
214187
214413
|
const translateTransform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createTranslation(this._startPtWorld.minus(targetWorld));
|
|
214188
|
-
const rotationTransform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createFixedPointAndMatrix(targetWorld, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(vp.view.getZVector(), rotation));
|
|
214414
|
+
const rotationTransform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createFixedPointAndMatrix(targetWorld, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(vp.view.getZVector(), rotation) ?? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity);
|
|
214189
214415
|
const scaleTransform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createScaleAboutPoint(this._startPtWorld, zoomRatio);
|
|
214190
214416
|
const transform = translateTransform.multiplyTransformTransform(rotationTransform);
|
|
214191
214417
|
scaleTransform.multiplyTransformTransform(transform, transform);
|
|
@@ -214194,6 +214420,8 @@ class DefaultViewTouchTool extends ViewManip {
|
|
|
214194
214420
|
}
|
|
214195
214421
|
handle3dRotate() {
|
|
214196
214422
|
const vp = this.viewport;
|
|
214423
|
+
if (undefined === vp)
|
|
214424
|
+
return;
|
|
214197
214425
|
const viewRect = vp.viewRect;
|
|
214198
214426
|
const xExtent = viewRect.width;
|
|
214199
214427
|
const yExtent = viewRect.height;
|
|
@@ -214201,8 +214429,8 @@ class DefaultViewTouchTool extends ViewManip {
|
|
|
214201
214429
|
const yDelta = this._lastPtView.y - this._startPtView.y;
|
|
214202
214430
|
const xAxis = _ToolSettings__WEBPACK_IMPORTED_MODULE_20__.ToolSettings.preserveWorldUp ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ() : vp.rotation.getRow(1);
|
|
214203
214431
|
const yAxis = vp.rotation.getRow(0);
|
|
214204
|
-
const xRMatrix = (
|
|
214205
|
-
const yRMatrix = (
|
|
214432
|
+
const xRMatrix = (xDelta ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(xAxis, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(Math.PI / (xExtent / xDelta))) : undefined) ?? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity;
|
|
214433
|
+
const yRMatrix = (yDelta ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(yAxis, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(Math.PI / (yExtent / yDelta))) : undefined) ?? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity;
|
|
214206
214434
|
const worldRMatrix = yRMatrix.multiplyMatrixMatrix(xRMatrix);
|
|
214207
214435
|
const result = worldRMatrix.getAxisAndAngleOfRotation();
|
|
214208
214436
|
const radians = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(-result.angle.radians);
|
|
@@ -214216,6 +214444,8 @@ class DefaultViewTouchTool extends ViewManip {
|
|
|
214216
214444
|
}
|
|
214217
214445
|
handle3dPanZoom(ev) {
|
|
214218
214446
|
const vp = this.viewport;
|
|
214447
|
+
if (undefined === vp)
|
|
214448
|
+
return;
|
|
214219
214449
|
const zoomRatio = this.computeZoomRatio(ev);
|
|
214220
214450
|
if (vp.isCameraOn) {
|
|
214221
214451
|
const targetWorld = vp.viewToWorld(this._lastPtView);
|
|
@@ -214274,6 +214504,8 @@ class DefaultViewTouchTool extends ViewManip {
|
|
|
214274
214504
|
}
|
|
214275
214505
|
perform(ev) {
|
|
214276
214506
|
const vp = this.viewport;
|
|
214507
|
+
if (undefined === vp)
|
|
214508
|
+
return;
|
|
214277
214509
|
vp.setupViewFromFrustum(this._frustum);
|
|
214278
214510
|
const singleTouch = this._singleTouch;
|
|
214279
214511
|
return (!this._only2dManipulations && vp.view.allow3dManipulations()) ?
|
|
@@ -214296,7 +214528,8 @@ class DefaultViewTouchTool extends ViewManip {
|
|
|
214296
214528
|
this._duration = _ToolSettings__WEBPACK_IMPORTED_MODULE_20__.ToolSettings.viewingInertia.duration;
|
|
214297
214529
|
if (this._duration.isTowardsFuture) { // ensure duration is towards future. Otherwise, don't start animation
|
|
214298
214530
|
this._end = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeTimePoint.fromNow(this._duration);
|
|
214299
|
-
this.viewport
|
|
214531
|
+
if (undefined !== this.viewport)
|
|
214532
|
+
this.viewport.setAnimator(this);
|
|
214300
214533
|
}
|
|
214301
214534
|
}
|
|
214302
214535
|
return this.exitTool();
|
|
@@ -215006,7 +215239,7 @@ class Geometry {
|
|
|
215006
215239
|
static largeCoordinateResult = 1.0e13;
|
|
215007
215240
|
/**
|
|
215008
215241
|
* Numeric value that may considered infinite for metric coordinates.
|
|
215009
|
-
* @deprecated in 4.
|
|
215242
|
+
* @deprecated in 4.9.0 - will not be removed until after 2026-06-13. Use [[largeCoordinateResult]].
|
|
215010
215243
|
* * This coordinate should be used only as a placeholder indicating "at infinity" -- computing actual
|
|
215011
215244
|
* points at this coordinate invites numerical problems.
|
|
215012
215245
|
*/
|
|
@@ -215017,7 +215250,7 @@ class Geometry {
|
|
|
215017
215250
|
}
|
|
215018
215251
|
/**
|
|
215019
215252
|
* Test if the absolute value of x is at least [[largeCoordinateResult]].
|
|
215020
|
-
* @deprecated in 4.
|
|
215253
|
+
* @deprecated in 4.9.0 - will not be removed until after 2026-06-13. Use [[isLargeCoordinateResult]].
|
|
215021
215254
|
*/
|
|
215022
215255
|
static isHugeCoordinate(x) {
|
|
215023
215256
|
return Geometry.isLargeCoordinateResult(x);
|
|
@@ -215984,7 +216217,7 @@ class Geometry {
|
|
|
215984
216217
|
/**
|
|
215985
216218
|
* Clone an array whose members have type `T`, which implements the clone method.
|
|
215986
216219
|
* * If the clone method returns `undefined`, then `undefined` is forced into the cloned array.
|
|
215987
|
-
* @deprecated in 4.
|
|
216220
|
+
* @deprecated in 4.4.0 - will not be removed until after 2026-06-13. Use cloneArray.
|
|
215988
216221
|
*/
|
|
215989
216222
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
215990
216223
|
static cloneMembers(array) {
|
|
@@ -216410,7 +216643,7 @@ class BSpline1dNd {
|
|
|
216410
216643
|
* Test if the leading and trailing polygon coordinates are replicated in the manner of a "closed" bspline polygon
|
|
216411
216644
|
* which has been expanded to act as a normal bspline.
|
|
216412
216645
|
* @returns true if `degree` leading and trailing polygon blocks match.
|
|
216413
|
-
* @deprecated in 4.
|
|
216646
|
+
* @deprecated in 4.2.1 - will not be removed until after 2026-06-13. Use `testClosablePolygon` instead.
|
|
216414
216647
|
*/
|
|
216415
216648
|
testCloseablePolygon(mode) {
|
|
216416
216649
|
return this.testClosablePolygon(mode);
|
|
@@ -218710,7 +218943,7 @@ var UVSelect;
|
|
|
218710
218943
|
UVSelect[UVSelect["uDirection"] = 0] = "uDirection";
|
|
218711
218944
|
/**
|
|
218712
218945
|
* index of v direction
|
|
218713
|
-
* @deprecated in 4.
|
|
218946
|
+
* @deprecated in 4.3.0 - will not be removed until after 2026-06-13. Use vDirection instead.
|
|
218714
218947
|
*/
|
|
218715
218948
|
UVSelect[UVSelect["VDirection"] = 1] = "VDirection";
|
|
218716
218949
|
/** index of v direction */
|
|
@@ -218937,7 +219170,7 @@ class BSpline2dNd extends _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_0__.Geom
|
|
|
218937
219170
|
}
|
|
218938
219171
|
/**
|
|
218939
219172
|
* sum poles by the weights in the basisBuffer, using poles for given span
|
|
218940
|
-
* @deprecated in 4.
|
|
219173
|
+
* @deprecated in 4.3.0 - will not be removed until after 2026-06-13. Use sumPoleBufferDerivativesForSpan instead.
|
|
218941
219174
|
*/
|
|
218942
219175
|
sumpoleBufferDerivativesForSpan(spanIndexU, spanIndexV) {
|
|
218943
219176
|
return this.sumPoleBufferDerivativesForSpan(spanIndexU, spanIndexV);
|
|
@@ -232297,7 +232530,7 @@ class CurveLocationDetailPair {
|
|
|
232297
232530
|
}
|
|
232298
232531
|
/**
|
|
232299
232532
|
* Data bundle for a pair of arrays of CurveLocationDetail structures.
|
|
232300
|
-
* @deprecated in 4.
|
|
232533
|
+
* @deprecated in 4.2.0 - will not be removed until after 2026-06-13. Use CurveLocationDetailPair[] instead.
|
|
232301
232534
|
* @public
|
|
232302
232535
|
*/
|
|
232303
232536
|
class CurveLocationDetailArrayPair {
|
|
@@ -240283,7 +240516,7 @@ class StrokeOptions {
|
|
|
240283
240516
|
maxEdgeLength;
|
|
240284
240517
|
/**
|
|
240285
240518
|
* Caller expects convex facets.
|
|
240286
|
-
* @deprecated in 4.
|
|
240519
|
+
* @deprecated in 4.2.0 - will not be removed until after 2026-06-13. Never used. See [[shouldTriangulate]] and [[maximizeConvexFacets]].
|
|
240287
240520
|
*/
|
|
240288
240521
|
needConvexFacets;
|
|
240289
240522
|
/** Minimum strokes on a primitive. */
|
|
@@ -254551,7 +254784,7 @@ class GrowableXYArray extends _IndexedXYCollection__WEBPACK_IMPORTED_MODULE_0__.
|
|
|
254551
254784
|
return result;
|
|
254552
254785
|
}
|
|
254553
254786
|
/** Restructure MultiLineStringDataVariant as array of GrowableXYZArray
|
|
254554
|
-
* @deprecated in 4.
|
|
254787
|
+
* @deprecated in 4.2.0 - will not be removed until after 2026-06-13. Moved to GrowableXYZArray class.
|
|
254555
254788
|
*/
|
|
254556
254789
|
static createArrayOfGrowableXYZArray(data) {
|
|
254557
254790
|
return _GrowableXYZArray__WEBPACK_IMPORTED_MODULE_1__.GrowableXYZArray.createArrayOfGrowableXYZArray(data);
|
|
@@ -273245,7 +273478,7 @@ class Point4d extends _geometry3d_Plane3d__WEBPACK_IMPORTED_MODULE_0__.Plane3d {
|
|
|
273245
273478
|
* extract 4 consecutive numbers from a Float64Array into a Point4d.
|
|
273246
273479
|
* @param data buffer of numbers
|
|
273247
273480
|
* @param xIndex first index for x,y,z,w sequence. Assumed to be a valid index!
|
|
273248
|
-
* @deprecated in 4.
|
|
273481
|
+
* @deprecated in 4.3.0 - will not be removed until after 2026-06-13. Use createFromPacked instead.
|
|
273249
273482
|
*/
|
|
273250
273483
|
static createFromPackedXYZW(data, xIndex = 0, result) {
|
|
273251
273484
|
return Point4d.create(data[xIndex], data[xIndex + 1], data[xIndex + 2], data[xIndex + 3], result);
|
|
@@ -282573,7 +282806,7 @@ class IndexedPolyface extends Polyface {
|
|
|
282573
282806
|
}
|
|
282574
282807
|
/**
|
|
282575
282808
|
* Clean up the open facet.
|
|
282576
|
-
* @deprecated in 4.
|
|
282809
|
+
* @deprecated in 4.5.0 - will not be removed until after 2026-06-13. To remove nebulous "open facet" concept from the API. Call [[PolyfaceData.trimAllIndexArrays]]
|
|
282577
282810
|
* instead.
|
|
282578
282811
|
*/
|
|
282579
282812
|
cleanupOpenFacet() {
|
|
@@ -282723,7 +282956,7 @@ class IndexedPolyface extends Polyface {
|
|
|
282723
282956
|
}
|
|
282724
282957
|
/**
|
|
282725
282958
|
* Given the index of a facet, return the data pertaining to the face it is a part of.
|
|
282726
|
-
* @deprecated in 4.
|
|
282959
|
+
* @deprecated in 4.5.0 - will not be removed until after 2026-06-13. Use [[IndexedPolyface.tryGetFaceData]], which verifies the index is in range.
|
|
282727
282960
|
*/
|
|
282728
282961
|
getFaceDataByFacetIndex(facetIndex) {
|
|
282729
282962
|
return this.data.face[this._facetToFaceData[facetIndex]];
|
|
@@ -283945,7 +284178,7 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
|
|
|
283945
284178
|
* Apply stroke counts to curve primitives.
|
|
283946
284179
|
* * Recursively visit all children of data.
|
|
283947
284180
|
* * At each primitive, invoke `computeStrokeCountForOptions` method with options from the builder.
|
|
283948
|
-
* @deprecated in 4.
|
|
284181
|
+
* @deprecated in 4.8.0 - will not be removed until after 2026-06-13. This method does nothing and is unneeded.
|
|
283949
284182
|
*/
|
|
283950
284183
|
applyStrokeCountsToCurvePrimitives(data) {
|
|
283951
284184
|
const options = this._options;
|
|
@@ -285984,7 +286217,7 @@ class PolyfaceData {
|
|
|
285984
286217
|
}
|
|
285985
286218
|
/**
|
|
285986
286219
|
* Resize all data arrays to the specified `length`.
|
|
285987
|
-
* @deprecated in 4.
|
|
286220
|
+
* @deprecated in 4.5.0 - will not be removed until after 2026-06-13. Because name is misleading. Call [[PolyfaceData.resizeAllArrays]] instead.
|
|
285988
286221
|
*/
|
|
285989
286222
|
resizeAllDataArrays(length) {
|
|
285990
286223
|
if (length > this.point.length) {
|
|
@@ -287556,7 +287789,7 @@ class PolyfaceQuery {
|
|
|
287556
287789
|
});
|
|
287557
287790
|
return builder.claimPolyface(true);
|
|
287558
287791
|
}
|
|
287559
|
-
/** @deprecated in 4.
|
|
287792
|
+
/** @deprecated in 4.7.0 - will not be removed until after 2026-06-13. Use [[sweepLineStringToFacetsXYReturnSweptFacets]] instead. */
|
|
287560
287793
|
static sweepLinestringToFacetsXYreturnSweptFacets(linestringPoints, polyface) {
|
|
287561
287794
|
return this.sweepLineStringToFacetsXYReturnSweptFacets(linestringPoints, polyface);
|
|
287562
287795
|
}
|
|
@@ -287659,7 +287892,7 @@ class PolyfaceQuery {
|
|
|
287659
287892
|
* * Return collected line segments.
|
|
287660
287893
|
* * This calls [[sweepLineStringToFacets]] with options created by
|
|
287661
287894
|
* `const options = SweepLineStringToFacetsOptions.create(Vector3d.unitZ(), Angle.createSmallAngle(), false, true, true, true);`
|
|
287662
|
-
* @deprecated in 4.
|
|
287895
|
+
* @deprecated in 4.7.0 - will not be removed until after 2026-06-13. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
|
|
287663
287896
|
*/
|
|
287664
287897
|
static sweepLinestringToFacetsXYReturnLines(linestringPoints, polyface) {
|
|
287665
287898
|
const options = SweepLineStringToFacetsOptions.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ(), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createSmallAngle(), false, true, true, true);
|
|
@@ -287669,7 +287902,7 @@ class PolyfaceQuery {
|
|
|
287669
287902
|
* Find segments (within the linestring) which project to facets.
|
|
287670
287903
|
* * Return chains.
|
|
287671
287904
|
* * This calls [[sweepLineStringToFacets]] with default options.
|
|
287672
|
-
* @deprecated in 4.
|
|
287905
|
+
* @deprecated in 4.7.0 - will not be removed until after 2026-06-13. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
|
|
287673
287906
|
*/
|
|
287674
287907
|
static sweepLinestringToFacetsXYReturnChains(linestringPoints, polyface) {
|
|
287675
287908
|
return PolyfaceQuery.sweepLineStringToFacets(linestringPoints, polyface);
|
|
@@ -301466,7 +301699,7 @@ class Sample {
|
|
|
301466
301699
|
return points;
|
|
301467
301700
|
}
|
|
301468
301701
|
// cspell:word creat
|
|
301469
|
-
/** @deprecated in 4.
|
|
301702
|
+
/** @deprecated in 4.0.0 - will not be removed until after 2026-06-13. Use createVerticalStaggerPolygon instead. */
|
|
301470
301703
|
static creatVerticalStaggerPolygon(dy1, dy2, dy3, dy4, ax, ay, dx1, dx4) {
|
|
301471
301704
|
return this.createVerticalStaggerPolygon(dy1, dy2, dy3, dy4, ax, ay, dx1, dx4);
|
|
301472
301705
|
}
|
|
@@ -334630,18 +334863,18 @@ class Settings {
|
|
|
334630
334863
|
}
|
|
334631
334864
|
}
|
|
334632
334865
|
toString() {
|
|
334633
|
-
return `Configurations:
|
|
334634
|
-
backend location: ${this.Backend.location},
|
|
334635
|
-
backend name: ${this.Backend.name},
|
|
334636
|
-
backend version: ${this.Backend.version},
|
|
334637
|
-
oidc client id: ${this.oidcClientId},
|
|
334638
|
-
oidc scopes: ${this.oidcScopes},
|
|
334639
|
-
applicationId: ${this.gprid},
|
|
334640
|
-
log level: ${this.logLevel},
|
|
334641
|
-
testing iModelTileRpcTests: ${this.runiModelTileRpcTests},
|
|
334642
|
-
testing PresentationRpcTest: ${this.runPresentationRpcTests},
|
|
334643
|
-
testing iModelReadRpcTests: ${this.runiModelReadRpcTests},
|
|
334644
|
-
testing DevToolsRpcTests: ${this.runDevToolsRpcTests},
|
|
334866
|
+
return `Configurations:
|
|
334867
|
+
backend location: ${this.Backend.location},
|
|
334868
|
+
backend name: ${this.Backend.name},
|
|
334869
|
+
backend version: ${this.Backend.version},
|
|
334870
|
+
oidc client id: ${this.oidcClientId},
|
|
334871
|
+
oidc scopes: ${this.oidcScopes},
|
|
334872
|
+
applicationId: ${this.gprid},
|
|
334873
|
+
log level: ${this.logLevel},
|
|
334874
|
+
testing iModelTileRpcTests: ${this.runiModelTileRpcTests},
|
|
334875
|
+
testing PresentationRpcTest: ${this.runPresentationRpcTests},
|
|
334876
|
+
testing iModelReadRpcTests: ${this.runiModelReadRpcTests},
|
|
334877
|
+
testing DevToolsRpcTests: ${this.runDevToolsRpcTests},
|
|
334645
334878
|
testing iModelWriteRpcTests: ${this.runiModelWriteRpcTests}`;
|
|
334646
334879
|
}
|
|
334647
334880
|
}
|
|
@@ -334855,7 +335088,7 @@ class TestContext {
|
|
|
334855
335088
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
334856
335089
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
334857
335090
|
await core_frontend_1.NoRenderApp.startup({
|
|
334858
|
-
applicationVersion: "5.1.0-dev.
|
|
335091
|
+
applicationVersion: "5.1.0-dev.62",
|
|
334859
335092
|
applicationId: this.settings.gprid,
|
|
334860
335093
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
334861
335094
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -335136,7 +335369,7 @@ class UiAdmin {
|
|
|
335136
335369
|
/** Get the cursor X and Y position. */
|
|
335137
335370
|
get cursorPosition() { return { x: 0, y: 0 }; }
|
|
335138
335371
|
/** Create a PointProps object.
|
|
335139
|
-
* @deprecated in 4.2.
|
|
335372
|
+
* @deprecated in 4.2.0 - will not be removed until after 2026-06-13. Please use @core/geometry [[XAndY]] or a custom implementation.
|
|
335140
335373
|
*/
|
|
335141
335374
|
createXAndY(x, y) { return { x, y }; }
|
|
335142
335375
|
/** Determines if focus is set to Home */
|
|
@@ -335439,7 +335672,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
335439
335672
|
/**
|
|
335440
335673
|
* Class that define Standard Content Layouts that can be used to specify how the content is arranged in a frontstage.
|
|
335441
335674
|
* @public
|
|
335442
|
-
* @deprecated in 4.10.
|
|
335675
|
+
* @deprecated in 4.10.0 - will not be removed until after 2026-06-13. Use `StandardContentLayouts` from `@itwin/appui-react`.
|
|
335443
335676
|
*/
|
|
335444
335677
|
class StandardContentLayouts {
|
|
335445
335678
|
static singleView = {
|
|
@@ -337098,14 +337331,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
337098
337331
|
|
|
337099
337332
|
/** UiSync Event class.
|
|
337100
337333
|
* @public
|
|
337101
|
-
* @deprecated in 4.2.
|
|
337334
|
+
* @deprecated in 4.2.0 - will not be removed until after 2026-06-13. Use [[UiSyncEvent]] from @itwin/appui-react.
|
|
337102
337335
|
*/
|
|
337336
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
337103
337337
|
class UiSyncEvent extends _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeUiEvent {
|
|
337104
337338
|
}
|
|
337105
337339
|
/** This class is used to send eventIds to interested UI components so the component can determine if it needs
|
|
337106
337340
|
* to refresh its display by calling setState on itself.
|
|
337107
337341
|
* @public
|
|
337108
|
-
* @deprecated in 4.2.
|
|
337342
|
+
* @deprecated in 4.2.0 - will not be removed until after 2026-06-13. Use [[SyncUiEventDispatcher]] from @itwin/appui-react.
|
|
337109
337343
|
*/
|
|
337110
337344
|
class UiEventDispatcher {
|
|
337111
337345
|
_syncEventTimerId;
|
|
@@ -340953,6 +341187,7 @@ class ElementPropertiesBuilder {
|
|
|
340953
341187
|
processPrimitiveValue(props) {
|
|
340954
341188
|
this._currentAppender.append(props.field.label, {
|
|
340955
341189
|
type: "primitive",
|
|
341190
|
+
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
|
340956
341191
|
value: props.displayValue?.toString() ?? "",
|
|
340957
341192
|
});
|
|
340958
341193
|
}
|
|
@@ -359942,7 +360177,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
359942
360177
|
/***/ ((module) => {
|
|
359943
360178
|
|
|
359944
360179
|
"use strict";
|
|
359945
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.1.0-dev.
|
|
360180
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.1.0-dev.62","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","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","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.2.2-dev.2","@types/chai-as-promised":"^7","@types/sinon":"^17.0.2","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.31.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^6.0.1","sinon":"^17.0.2","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"}}');
|
|
359946
360181
|
|
|
359947
360182
|
/***/ }),
|
|
359948
360183
|
|