@itwin/core-frontend 4.9.0-dev.9 → 4.10.0-dev.0
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/CHANGELOG.md +26 -1
- package/lib/cjs/AccuDraw.d.ts +7 -0
- package/lib/cjs/AccuDraw.d.ts.map +1 -1
- package/lib/cjs/AccuDraw.js +16 -8
- package/lib/cjs/AccuDraw.js.map +1 -1
- package/lib/cjs/PlanarClipMaskState.d.ts +2 -3
- package/lib/cjs/PlanarClipMaskState.d.ts.map +1 -1
- package/lib/cjs/PlanarClipMaskState.js +7 -7
- package/lib/cjs/PlanarClipMaskState.js.map +1 -1
- package/lib/cjs/common/internal/render/GraphicDescriptionBuilderImpl.d.ts.map +1 -1
- package/lib/cjs/common/internal/render/GraphicDescriptionBuilderImpl.js +18 -35
- package/lib/cjs/common/internal/render/GraphicDescriptionBuilderImpl.js.map +1 -1
- package/lib/cjs/render/webgl/PlanarClassifier.js +3 -3
- package/lib/cjs/render/webgl/PlanarClassifier.js.map +1 -1
- package/lib/cjs/render/webgl/glsl/PlanarClassification.js +1 -1
- package/lib/cjs/render/webgl/glsl/PlanarClassification.js.map +1 -1
- package/lib/cjs/tile/RealityModelTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/RealityModelTileTree.js.map +1 -1
- package/lib/cjs/tile/RenderGraphicTileTree.d.ts +2 -0
- package/lib/cjs/tile/RenderGraphicTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/RenderGraphicTileTree.js +2 -0
- package/lib/cjs/tile/RenderGraphicTileTree.js.map +1 -1
- package/lib/cjs/tile/TileTreeReference.d.ts +13 -5
- package/lib/cjs/tile/TileTreeReference.d.ts.map +1 -1
- package/lib/cjs/tile/TileTreeReference.js +13 -5
- package/lib/cjs/tile/TileTreeReference.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts +5 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.js +5 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/MapTileTree.d.ts +1 -1
- package/lib/cjs/tile/map/MapTileTree.js +1 -1
- package/lib/cjs/tile/map/MapTileTree.js.map +1 -1
- package/lib/cjs/tools/AccuDrawTool.d.ts +34 -22
- package/lib/cjs/tools/AccuDrawTool.d.ts.map +1 -1
- package/lib/cjs/tools/AccuDrawTool.js +151 -88
- package/lib/cjs/tools/AccuDrawTool.js.map +1 -1
- package/lib/esm/AccuDraw.d.ts +7 -0
- package/lib/esm/AccuDraw.d.ts.map +1 -1
- package/lib/esm/AccuDraw.js +16 -8
- package/lib/esm/AccuDraw.js.map +1 -1
- package/lib/esm/PlanarClipMaskState.d.ts +2 -3
- package/lib/esm/PlanarClipMaskState.d.ts.map +1 -1
- package/lib/esm/PlanarClipMaskState.js +7 -7
- package/lib/esm/PlanarClipMaskState.js.map +1 -1
- package/lib/esm/common/internal/render/GraphicDescriptionBuilderImpl.d.ts.map +1 -1
- package/lib/esm/common/internal/render/GraphicDescriptionBuilderImpl.js +18 -35
- package/lib/esm/common/internal/render/GraphicDescriptionBuilderImpl.js.map +1 -1
- package/lib/esm/render/webgl/PlanarClassifier.js +3 -3
- package/lib/esm/render/webgl/PlanarClassifier.js.map +1 -1
- package/lib/esm/render/webgl/glsl/PlanarClassification.js +1 -1
- package/lib/esm/render/webgl/glsl/PlanarClassification.js.map +1 -1
- package/lib/esm/tile/RealityModelTileTree.d.ts.map +1 -1
- package/lib/esm/tile/RealityModelTileTree.js.map +1 -1
- package/lib/esm/tile/RenderGraphicTileTree.d.ts +2 -0
- package/lib/esm/tile/RenderGraphicTileTree.d.ts.map +1 -1
- package/lib/esm/tile/RenderGraphicTileTree.js +2 -0
- package/lib/esm/tile/RenderGraphicTileTree.js.map +1 -1
- package/lib/esm/tile/TileTreeReference.d.ts +13 -5
- package/lib/esm/tile/TileTreeReference.d.ts.map +1 -1
- package/lib/esm/tile/TileTreeReference.js +13 -5
- package/lib/esm/tile/TileTreeReference.js.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts +5 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.js +5 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/MapTileTree.d.ts +1 -1
- package/lib/esm/tile/map/MapTileTree.js +1 -1
- package/lib/esm/tile/map/MapTileTree.js.map +1 -1
- package/lib/esm/tools/AccuDrawTool.d.ts +34 -22
- package/lib/esm/tools/AccuDrawTool.d.ts.map +1 -1
- package/lib/esm/tools/AccuDrawTool.js +151 -89
- package/lib/esm/tools/AccuDrawTool.js.map +1 -1
- package/lib/public/locales/en/CoreTools.json +5 -0
- package/lib/public/scripts/parse-imdl-worker.js +1 -1
- package/lib/workers/webpack/parse-imdl-worker.js +1 -1
- package/package.json +19 -19
package/lib/esm/AccuDraw.js
CHANGED
|
@@ -905,21 +905,30 @@ export class AccuDraw {
|
|
|
905
905
|
const rMatrix = this.getRotation();
|
|
906
906
|
rMatrix.multiplyTransposeVector(this.vector);
|
|
907
907
|
}
|
|
908
|
+
/** Allow the AccuDraw user interface to supply the distance parser */
|
|
909
|
+
getLengthParser() {
|
|
910
|
+
return IModelApp.quantityFormatter.findParserSpecByQuantityType(QuantityType.Length);
|
|
911
|
+
}
|
|
908
912
|
stringToDistance(str) {
|
|
909
|
-
const parserSpec =
|
|
913
|
+
const parserSpec = this.getLengthParser();
|
|
910
914
|
if (parserSpec)
|
|
911
915
|
return parserSpec.parseToQuantityValue(str);
|
|
912
916
|
return { ok: false, error: ParseError.InvalidParserSpec };
|
|
913
917
|
}
|
|
918
|
+
/** Allow the AccuDraw user interface to specify bearing */
|
|
919
|
+
get isBearingMode() { return false; }
|
|
920
|
+
/** Allow the AccuDraw user interface to supply the angle/direction parser */
|
|
921
|
+
getAngleParser() {
|
|
922
|
+
// TODO: Use QuantityType.Angle when isBearingMode=false and "Bearing" for isBearingMode=true.
|
|
923
|
+
return IModelApp.quantityFormatter.findParserSpecByQuantityType(QuantityType.Angle);
|
|
924
|
+
}
|
|
914
925
|
stringToAngle(inString) {
|
|
915
|
-
|
|
916
|
-
// use QuantityType.Angle for isBearing=false and "Bearing" for isBearing=true.
|
|
917
|
-
const parserSpec = IModelApp.quantityFormatter.findParserSpecByQuantityType(QuantityType.Angle);
|
|
926
|
+
const parserSpec = this.getAngleParser();
|
|
918
927
|
if (parserSpec)
|
|
919
928
|
return parserSpec.parseToQuantityValue(inString);
|
|
920
929
|
return { ok: false, error: ParseError.InvalidParserSpec };
|
|
921
930
|
}
|
|
922
|
-
updateFieldValue(index, input
|
|
931
|
+
updateFieldValue(index, input) {
|
|
923
932
|
if (input.length === 0)
|
|
924
933
|
return BentleyStatus.ERROR;
|
|
925
934
|
if (input.length === 1)
|
|
@@ -1062,8 +1071,7 @@ export class AccuDraw {
|
|
|
1062
1071
|
}
|
|
1063
1072
|
/** Call from an AccuDraw UI event to sync the supplied input field value */
|
|
1064
1073
|
async processFieldInput(index, input, synchText) {
|
|
1065
|
-
|
|
1066
|
-
if (BentleyStatus.SUCCESS !== this.updateFieldValue(index, input, { isBearing })) {
|
|
1074
|
+
if (BentleyStatus.SUCCESS !== this.updateFieldValue(index, input)) {
|
|
1067
1075
|
const saveKeyinStatus = this._keyinStatus[index]; // Don't want this to change when entering '.', etc.
|
|
1068
1076
|
this.updateFieldLock(index, false);
|
|
1069
1077
|
this._keyinStatus[index] = saveKeyinStatus;
|
|
@@ -1080,7 +1088,7 @@ export class AccuDraw {
|
|
|
1080
1088
|
this.onFieldValueChange(index);
|
|
1081
1089
|
this.setKeyinStatus(index, KeyinStatus.Dynamic);
|
|
1082
1090
|
}
|
|
1083
|
-
if (!
|
|
1091
|
+
if (!this.isBearingMode || !this.flags.bearingFixToPlane2D)
|
|
1084
1092
|
this.updateVector(this._angle);
|
|
1085
1093
|
else
|
|
1086
1094
|
this.vector.set(Math.cos(this._angle), Math.sin(this._angle), 0.0);
|