@itwin/core-frontend 5.0.0-dev.32 → 5.0.0-dev.34
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/cjs/AccuDraw.js +1 -1
- package/lib/cjs/AccuDraw.js.map +1 -1
- package/lib/cjs/ApproximateTerrainHeights.js +1 -1
- package/lib/cjs/ApproximateTerrainHeights.js.map +1 -1
- package/lib/cjs/BackgroundMapGeometry.js +5 -5
- package/lib/cjs/BackgroundMapGeometry.js.map +1 -1
- package/lib/cjs/DrawingViewState.js +9 -9
- package/lib/cjs/DrawingViewState.js.map +1 -1
- package/lib/cjs/GraphicalEditingScope.js +4 -4
- package/lib/cjs/GraphicalEditingScope.js.map +1 -1
- package/lib/cjs/IModelApp.js +61 -63
- package/lib/cjs/IModelApp.js.map +1 -1
- package/lib/cjs/IModelConnection.js +10 -10
- package/lib/cjs/IModelConnection.js.map +1 -1
- package/lib/cjs/IModelRoutingContext.js +1 -1
- package/lib/cjs/IModelRoutingContext.js.map +1 -1
- package/lib/cjs/IpcApp.js +2 -2
- package/lib/cjs/IpcApp.js.map +1 -1
- package/lib/cjs/LocalhostIpcApp.js +1 -1
- package/lib/cjs/LocalhostIpcApp.js.map +1 -1
- package/lib/cjs/NativeApp.js +15 -17
- package/lib/cjs/NativeApp.js.map +1 -1
- package/lib/cjs/NativeAppLogger.js +1 -1
- package/lib/cjs/NativeAppLogger.js.map +1 -1
- package/lib/cjs/NoRenderApp.js +1 -1
- package/lib/cjs/NoRenderApp.js.map +1 -1
- package/lib/cjs/SelectionSet.js +148 -156
- package/lib/cjs/SelectionSet.js.map +1 -1
- package/lib/cjs/Sprites.js +1 -1
- package/lib/cjs/Sprites.js.map +1 -1
- package/lib/cjs/ViewCreator2d.js +3 -3
- package/lib/cjs/ViewCreator2d.js.map +1 -1
- package/lib/cjs/ViewGlobalLocation.js +5 -5
- package/lib/cjs/ViewGlobalLocation.js.map +1 -1
- package/lib/cjs/ViewState.js +2 -2
- package/lib/cjs/ViewState.js.map +1 -1
- package/lib/cjs/ViewingSpace.js +9 -9
- package/lib/cjs/ViewingSpace.js.map +1 -1
- package/lib/cjs/Viewport.js +41 -41
- package/lib/cjs/Viewport.js.map +1 -1
- package/lib/cjs/common/internal/render/DisplayParams.js +1 -1
- package/lib/cjs/common/internal/render/DisplayParams.js.map +1 -1
- package/lib/cjs/common/internal/render/GraphicDescriptionBuilderImpl.js +1 -1
- package/lib/cjs/common/internal/render/GraphicDescriptionBuilderImpl.js.map +1 -1
- package/lib/cjs/common/internal/render/GraphicDescriptionContextImpl.js +1 -1
- package/lib/cjs/common/internal/render/GraphicDescriptionContextImpl.js.map +1 -1
- package/lib/cjs/internal/render/PrimitiveBuilder.js +1 -1
- package/lib/cjs/internal/render/PrimitiveBuilder.js.map +1 -1
- package/lib/cjs/internal/render/RenderInstancesParamsImpl.js +1 -1
- package/lib/cjs/internal/render/RenderInstancesParamsImpl.js.map +1 -1
- package/lib/cjs/render/MockRender.js +3 -3
- package/lib/cjs/render/MockRender.js.map +1 -1
- package/lib/cjs/render/webgl/BackgroundMapDrape.js +1 -1
- package/lib/cjs/render/webgl/BackgroundMapDrape.js.map +1 -1
- package/lib/cjs/render/webgl/BatchState.js +1 -1
- package/lib/cjs/render/webgl/BatchState.js.map +1 -1
- package/lib/cjs/render/webgl/ColorInfo.js +2 -2
- package/lib/cjs/render/webgl/ColorInfo.js.map +1 -1
- package/lib/cjs/render/webgl/Diagnostics.js +4 -4
- package/lib/cjs/render/webgl/Diagnostics.js.map +1 -1
- package/lib/cjs/render/webgl/DrawCommand.js +4 -4
- package/lib/cjs/render/webgl/DrawCommand.js.map +1 -1
- package/lib/cjs/render/webgl/IModelFrameLifecycle.js +4 -4
- package/lib/cjs/render/webgl/IModelFrameLifecycle.js.map +1 -1
- package/lib/cjs/render/webgl/InstancedGeometry.js +3 -3
- package/lib/cjs/render/webgl/InstancedGeometry.js.map +1 -1
- package/lib/cjs/render/webgl/Material.js +4 -4
- package/lib/cjs/render/webgl/Material.js.map +1 -1
- package/lib/cjs/render/webgl/PlanarClassifier.js +1 -1
- package/lib/cjs/render/webgl/PlanarClassifier.js.map +1 -1
- package/lib/cjs/render/webgl/PlanarTextureProjection.js +1 -1
- package/lib/cjs/render/webgl/PlanarTextureProjection.js.map +1 -1
- package/lib/cjs/render/webgl/RenderState.js +1 -1
- package/lib/cjs/render/webgl/RenderState.js.map +1 -1
- package/lib/cjs/render/webgl/Target.js +1 -1
- package/lib/cjs/render/webgl/Target.js.map +1 -1
- package/lib/cjs/render/webgl/Technique.js +39 -39
- package/lib/cjs/render/webgl/Technique.js.map +1 -1
- package/lib/cjs/render/webgl/TechniqueFlags.js +1 -1
- package/lib/cjs/render/webgl/TechniqueFlags.js.map +1 -1
- package/lib/cjs/render/webgl/Texture.js +3 -3
- package/lib/cjs/render/webgl/Texture.js.map +1 -1
- package/lib/cjs/tile/CesiumAssetProvider.js +1 -1
- package/lib/cjs/tile/CesiumAssetProvider.js.map +1 -1
- package/lib/cjs/tile/map/ArcGISTileMap.js +1 -1
- package/lib/cjs/tile/map/ArcGISTileMap.js.map +1 -1
- package/lib/cjs/tile/map/ArcGisUtilities.js +1 -1
- package/lib/cjs/tile/map/ArcGisUtilities.js.map +1 -1
- package/lib/cjs/tile/map/CesiumTerrainProvider.js +6 -6
- package/lib/cjs/tile/map/CesiumTerrainProvider.js.map +1 -1
- package/lib/cjs/tile/map/ImageryTileTree.js +2 -2
- package/lib/cjs/tile/map/ImageryTileTree.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryFormats.js +7 -7
- package/lib/cjs/tile/map/MapLayerImageryFormats.js.map +1 -1
- package/lib/cjs/tile/map/MapTile.js +8 -8
- package/lib/cjs/tile/map/MapTile.js.map +1 -1
- package/lib/cjs/tile/map/MapTileAvailability.js +1 -1
- package/lib/cjs/tile/map/MapTileAvailability.js.map +1 -1
- package/lib/cjs/tile/map/MapTileTree.js +9 -9
- package/lib/cjs/tile/map/MapTileTree.js.map +1 -1
- package/lib/cjs/tile/map/MapTilingScheme.js +1 -1
- package/lib/cjs/tile/map/MapTilingScheme.js.map +1 -1
- package/lib/cjs/tile/map/WmsCapabilities.js +2 -2
- package/lib/cjs/tile/map/WmsCapabilities.js.map +1 -1
- package/lib/cjs/tile/map/WmtsCapabilities.js +1 -1
- package/lib/cjs/tile/map/WmtsCapabilities.js.map +1 -1
- package/lib/cjs/tools/AccuDrawTool.js +21 -21
- package/lib/cjs/tools/AccuDrawTool.js.map +1 -1
- package/lib/cjs/tools/ClipViewTool.js +32 -32
- package/lib/cjs/tools/ClipViewTool.js.map +1 -1
- package/lib/cjs/tools/EditManipulator.js +2 -2
- package/lib/cjs/tools/EditManipulator.js.map +1 -1
- package/lib/cjs/tools/IdleTool.js +2 -2
- package/lib/cjs/tools/IdleTool.js.map +1 -1
- package/lib/cjs/tools/MeasureTool.js +34 -34
- package/lib/cjs/tools/MeasureTool.js.map +1 -1
- package/lib/cjs/tools/SelectTool.js +5 -5
- package/lib/cjs/tools/SelectTool.js.map +1 -1
- package/lib/cjs/tools/Tool.js +10 -10
- package/lib/cjs/tools/Tool.js.map +1 -1
- package/lib/cjs/tools/ToolAdmin.js +19 -19
- package/lib/cjs/tools/ToolAdmin.js.map +1 -1
- package/lib/cjs/tools/ToolAssistance.js +19 -19
- package/lib/cjs/tools/ToolAssistance.js.map +1 -1
- package/lib/cjs/tools/ToolSettings.js +63 -63
- package/lib/cjs/tools/ToolSettings.js.map +1 -1
- package/lib/cjs/tools/ViewTool.js +37 -37
- package/lib/cjs/tools/ViewTool.js.map +1 -1
- package/lib/esm/AccuDraw.js +1 -1
- package/lib/esm/AccuDraw.js.map +1 -1
- package/lib/esm/ApproximateTerrainHeights.js +1 -1
- package/lib/esm/ApproximateTerrainHeights.js.map +1 -1
- package/lib/esm/BackgroundMapGeometry.js +5 -5
- package/lib/esm/BackgroundMapGeometry.js.map +1 -1
- package/lib/esm/DrawingViewState.js +9 -9
- package/lib/esm/DrawingViewState.js.map +1 -1
- package/lib/esm/GraphicalEditingScope.js +4 -4
- package/lib/esm/GraphicalEditingScope.js.map +1 -1
- package/lib/esm/IModelApp.js +61 -63
- package/lib/esm/IModelApp.js.map +1 -1
- package/lib/esm/IModelConnection.js +10 -10
- package/lib/esm/IModelConnection.js.map +1 -1
- package/lib/esm/IModelRoutingContext.js +1 -1
- package/lib/esm/IModelRoutingContext.js.map +1 -1
- package/lib/esm/IpcApp.js +2 -2
- package/lib/esm/IpcApp.js.map +1 -1
- package/lib/esm/LocalhostIpcApp.js +1 -1
- package/lib/esm/LocalhostIpcApp.js.map +1 -1
- package/lib/esm/NativeApp.js +15 -17
- package/lib/esm/NativeApp.js.map +1 -1
- package/lib/esm/NativeAppLogger.js +1 -1
- package/lib/esm/NativeAppLogger.js.map +1 -1
- package/lib/esm/NoRenderApp.js +1 -1
- package/lib/esm/NoRenderApp.js.map +1 -1
- package/lib/esm/SelectionSet.js +148 -156
- package/lib/esm/SelectionSet.js.map +1 -1
- package/lib/esm/Sprites.js +1 -1
- package/lib/esm/Sprites.js.map +1 -1
- package/lib/esm/ViewCreator2d.js +3 -3
- package/lib/esm/ViewCreator2d.js.map +1 -1
- package/lib/esm/ViewGlobalLocation.js +5 -5
- package/lib/esm/ViewGlobalLocation.js.map +1 -1
- package/lib/esm/ViewState.js +2 -2
- package/lib/esm/ViewState.js.map +1 -1
- package/lib/esm/ViewingSpace.js +9 -9
- package/lib/esm/ViewingSpace.js.map +1 -1
- package/lib/esm/Viewport.js +41 -41
- package/lib/esm/Viewport.js.map +1 -1
- package/lib/esm/common/internal/render/DisplayParams.js +1 -1
- package/lib/esm/common/internal/render/DisplayParams.js.map +1 -1
- package/lib/esm/common/internal/render/GraphicDescriptionBuilderImpl.js +1 -1
- package/lib/esm/common/internal/render/GraphicDescriptionBuilderImpl.js.map +1 -1
- package/lib/esm/common/internal/render/GraphicDescriptionContextImpl.js +1 -1
- package/lib/esm/common/internal/render/GraphicDescriptionContextImpl.js.map +1 -1
- package/lib/esm/internal/render/PrimitiveBuilder.js +1 -1
- package/lib/esm/internal/render/PrimitiveBuilder.js.map +1 -1
- package/lib/esm/internal/render/RenderInstancesParamsImpl.js +1 -1
- package/lib/esm/internal/render/RenderInstancesParamsImpl.js.map +1 -1
- package/lib/esm/render/MockRender.js +3 -3
- package/lib/esm/render/MockRender.js.map +1 -1
- package/lib/esm/render/webgl/BackgroundMapDrape.js +1 -1
- package/lib/esm/render/webgl/BackgroundMapDrape.js.map +1 -1
- package/lib/esm/render/webgl/BatchState.js +1 -1
- package/lib/esm/render/webgl/BatchState.js.map +1 -1
- package/lib/esm/render/webgl/ColorInfo.js +2 -2
- package/lib/esm/render/webgl/ColorInfo.js.map +1 -1
- package/lib/esm/render/webgl/Diagnostics.js +4 -4
- package/lib/esm/render/webgl/Diagnostics.js.map +1 -1
- package/lib/esm/render/webgl/DrawCommand.js +4 -4
- package/lib/esm/render/webgl/DrawCommand.js.map +1 -1
- package/lib/esm/render/webgl/IModelFrameLifecycle.js +4 -4
- package/lib/esm/render/webgl/IModelFrameLifecycle.js.map +1 -1
- package/lib/esm/render/webgl/InstancedGeometry.js +3 -3
- package/lib/esm/render/webgl/InstancedGeometry.js.map +1 -1
- package/lib/esm/render/webgl/Material.js +4 -4
- package/lib/esm/render/webgl/Material.js.map +1 -1
- package/lib/esm/render/webgl/PlanarClassifier.js +1 -1
- package/lib/esm/render/webgl/PlanarClassifier.js.map +1 -1
- package/lib/esm/render/webgl/PlanarTextureProjection.js +1 -1
- package/lib/esm/render/webgl/PlanarTextureProjection.js.map +1 -1
- package/lib/esm/render/webgl/RenderState.js +1 -1
- package/lib/esm/render/webgl/RenderState.js.map +1 -1
- package/lib/esm/render/webgl/Target.js +1 -1
- package/lib/esm/render/webgl/Target.js.map +1 -1
- package/lib/esm/render/webgl/Technique.js +39 -39
- package/lib/esm/render/webgl/Technique.js.map +1 -1
- package/lib/esm/render/webgl/TechniqueFlags.js +1 -1
- package/lib/esm/render/webgl/TechniqueFlags.js.map +1 -1
- package/lib/esm/render/webgl/Texture.js +3 -3
- package/lib/esm/render/webgl/Texture.js.map +1 -1
- package/lib/esm/tile/CesiumAssetProvider.js +1 -1
- package/lib/esm/tile/CesiumAssetProvider.js.map +1 -1
- package/lib/esm/tile/map/ArcGISTileMap.js +1 -1
- package/lib/esm/tile/map/ArcGISTileMap.js.map +1 -1
- package/lib/esm/tile/map/ArcGisUtilities.js +1 -1
- package/lib/esm/tile/map/ArcGisUtilities.js.map +1 -1
- package/lib/esm/tile/map/CesiumTerrainProvider.js +6 -6
- package/lib/esm/tile/map/CesiumTerrainProvider.js.map +1 -1
- package/lib/esm/tile/map/ImageryTileTree.js +2 -2
- package/lib/esm/tile/map/ImageryTileTree.js.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryFormats.js +7 -7
- package/lib/esm/tile/map/MapLayerImageryFormats.js.map +1 -1
- package/lib/esm/tile/map/MapTile.js +8 -8
- package/lib/esm/tile/map/MapTile.js.map +1 -1
- package/lib/esm/tile/map/MapTileAvailability.js +1 -1
- package/lib/esm/tile/map/MapTileAvailability.js.map +1 -1
- package/lib/esm/tile/map/MapTileTree.js +9 -9
- package/lib/esm/tile/map/MapTileTree.js.map +1 -1
- package/lib/esm/tile/map/MapTilingScheme.js +1 -1
- package/lib/esm/tile/map/MapTilingScheme.js.map +1 -1
- package/lib/esm/tile/map/WmsCapabilities.js +2 -2
- package/lib/esm/tile/map/WmsCapabilities.js.map +1 -1
- package/lib/esm/tile/map/WmtsCapabilities.js +1 -1
- package/lib/esm/tile/map/WmtsCapabilities.js.map +1 -1
- package/lib/esm/tools/AccuDrawTool.js +21 -21
- package/lib/esm/tools/AccuDrawTool.js.map +1 -1
- package/lib/esm/tools/ClipViewTool.js +32 -32
- package/lib/esm/tools/ClipViewTool.js.map +1 -1
- package/lib/esm/tools/EditManipulator.js +2 -2
- package/lib/esm/tools/EditManipulator.js.map +1 -1
- package/lib/esm/tools/IdleTool.js +2 -2
- package/lib/esm/tools/IdleTool.js.map +1 -1
- package/lib/esm/tools/MeasureTool.js +34 -34
- package/lib/esm/tools/MeasureTool.js.map +1 -1
- package/lib/esm/tools/SelectTool.js +5 -5
- package/lib/esm/tools/SelectTool.js.map +1 -1
- package/lib/esm/tools/Tool.js +10 -10
- package/lib/esm/tools/Tool.js.map +1 -1
- package/lib/esm/tools/ToolAdmin.js +19 -19
- package/lib/esm/tools/ToolAdmin.js.map +1 -1
- package/lib/esm/tools/ToolAssistance.js +19 -19
- package/lib/esm/tools/ToolAssistance.js.map +1 -1
- package/lib/esm/tools/ToolSettings.js +63 -63
- package/lib/esm/tools/ToolSettings.js.map +1 -1
- package/lib/esm/tools/ViewTool.js +37 -37
- package/lib/esm/tools/ViewTool.js.map +1 -1
- package/lib/public/scripts/parse-imdl-worker.js +1 -1
- package/lib/workers/webpack/parse-imdl-worker.js +1 -1
- package/package.json +18 -18
|
@@ -66,6 +66,19 @@ export var ToolAssistanceInputMethod;
|
|
|
66
66
|
* @extensions
|
|
67
67
|
*/
|
|
68
68
|
export class ToolAssistance {
|
|
69
|
+
/** Up key symbol. */
|
|
70
|
+
static { this.upSymbol = "\u2bc5"; }
|
|
71
|
+
/** Down key symbol. */
|
|
72
|
+
static { this.downSymbol = "\u2bc6"; }
|
|
73
|
+
/** Left key symbol. */
|
|
74
|
+
static { this.leftSymbol = "\u2bc7"; }
|
|
75
|
+
/** Right key symbol. */
|
|
76
|
+
static { this.rightSymbol = "\u2bc8"; }
|
|
77
|
+
/** Keyboard info for Arrow keys. */
|
|
78
|
+
static { this.arrowKeyboardInfo = {
|
|
79
|
+
keys: [ToolAssistance.upSymbol],
|
|
80
|
+
bottomKeys: [ToolAssistance.leftSymbol, ToolAssistance.downSymbol, ToolAssistance.rightSymbol],
|
|
81
|
+
}; }
|
|
69
82
|
static translateKey(key) { return IModelApp.localization.getLocalizedString(`${CoreTools.namespace}:toolAssistance.${key}`); }
|
|
70
83
|
static translateTouch(cursor) { return IModelApp.localization.getLocalizedString(`${CoreTools.namespace}:touchCursor.${cursor}`); }
|
|
71
84
|
/** Return the translated string for the specified main instruction key */
|
|
@@ -100,6 +113,8 @@ export class ToolAssistance {
|
|
|
100
113
|
static get ctrlKeyboardInfo() {
|
|
101
114
|
return { keys: [ToolAssistance.ctrlKey] };
|
|
102
115
|
}
|
|
116
|
+
/** Shift key symbol. */
|
|
117
|
+
static { this.shiftSymbol = "\u21e7"; }
|
|
103
118
|
/** Keyboard info for Shift key with symbol. */
|
|
104
119
|
static get shiftKeyboardInfo() {
|
|
105
120
|
return { keys: [`${ToolAssistance.shiftSymbol} ${ToolAssistance.shiftKey}`] };
|
|
@@ -112,10 +127,14 @@ export class ToolAssistance {
|
|
|
112
127
|
static get shiftSymbolKeyboardInfo() {
|
|
113
128
|
return { keys: [` ${ToolAssistance.shiftKey} `] };
|
|
114
129
|
}
|
|
130
|
+
/** Ctrl key symbol. */
|
|
131
|
+
static { this.ctrlSymbol = "\u2038"; }
|
|
115
132
|
/** Keyboard info for Ctrl key symbol. */
|
|
116
133
|
static get ctrlSymbolKeyboardInfo() {
|
|
117
134
|
return { keys: [ToolAssistance.ctrlSymbol] };
|
|
118
135
|
}
|
|
136
|
+
/** Alt key symbol. */
|
|
137
|
+
static { this.altSymbol = "\u2387"; }
|
|
119
138
|
/** Keyboard info for Alt key symbol. */
|
|
120
139
|
static get altSymbolKeyboardInfo() {
|
|
121
140
|
return { keys: [ToolAssistance.altSymbol] };
|
|
@@ -206,23 +225,4 @@ export class ToolAssistance {
|
|
|
206
225
|
return instructions;
|
|
207
226
|
}
|
|
208
227
|
}
|
|
209
|
-
/** Up key symbol. */
|
|
210
|
-
ToolAssistance.upSymbol = "\u2bc5";
|
|
211
|
-
/** Down key symbol. */
|
|
212
|
-
ToolAssistance.downSymbol = "\u2bc6";
|
|
213
|
-
/** Left key symbol. */
|
|
214
|
-
ToolAssistance.leftSymbol = "\u2bc7";
|
|
215
|
-
/** Right key symbol. */
|
|
216
|
-
ToolAssistance.rightSymbol = "\u2bc8";
|
|
217
|
-
/** Keyboard info for Arrow keys. */
|
|
218
|
-
ToolAssistance.arrowKeyboardInfo = {
|
|
219
|
-
keys: [ToolAssistance.upSymbol],
|
|
220
|
-
bottomKeys: [ToolAssistance.leftSymbol, ToolAssistance.downSymbol, ToolAssistance.rightSymbol],
|
|
221
|
-
};
|
|
222
|
-
/** Shift key symbol. */
|
|
223
|
-
ToolAssistance.shiftSymbol = "\u21e7";
|
|
224
|
-
/** Ctrl key symbol. */
|
|
225
|
-
ToolAssistance.ctrlSymbol = "\u2038";
|
|
226
|
-
/** Alt key symbol. */
|
|
227
|
-
ToolAssistance.altSymbol = "\u2387";
|
|
228
228
|
//# sourceMappingURL=ToolAssistance.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolAssistance.js","sourceRoot":"","sources":["../../../src/tools/ToolAssistance.ts"],"names":[],"mappings":"AACA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC;;;GAGG;AACH,MAAM,CAAN,IAAY,mBAmCX;AAnCD,WAAY,mBAAmB;IAC7B,wFAAwF;IACxF,qEAAQ,CAAA;IACR,gBAAgB;IAChB,2EAAW,CAAA;IACX,qCAAqC;IACrC,2EAAW,CAAA;IACX,4CAA4C;IAC5C,uEAAS,CAAA;IACT,6CAA6C;IAC7C,yEAAU,CAAA;IACV,6CAA6C;IAC7C,yEAAU,CAAA;IACV,kEAAkE;IAClE,+EAAa,CAAA;IACb,mEAAmE;IACnE,iFAAc,CAAA;IACd,mEAAmE;IACnE,2FAAmB,CAAA;IACnB,kDAAkD;IAClD,2EAAW,CAAA;IACX,mDAAmD;IACnD,wFAAiB,CAAA;IACjB,8CAA8C;IAC9C,8EAAY,CAAA;IACZ,gDAAgD;IAChD,4EAAW,CAAA;IACX,4CAA4C;IAC5C,8EAAY,CAAA;IACZ,4CAA4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AAEtD,oCAAoC;AACb,gCAAiB,GAA+B;IACrE,IAAI,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC;IAC/B,UAAU,EAAE,CAAC,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC,WAAW,CAAC;CAC/F,CAAC;AA6CF,wBAAwB;AACD,0BAAW,GAAW,QAAQ,CAAC;AAiBtD,uBAAuB;AACA,yBAAU,GAAW,QAAQ,CAAC;AAOrD,sBAAsB;AACC,wBAAS,GAAW,QAAQ,CAAC","sourcesContent":["\n/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tools\n */\n\nimport { IModelApp } from \"../IModelApp\";\nimport { CoreTools } from \"./Tool\";\n\n/** Tool Assistance known images\n * @public\n * @extensions\n */\nexport enum ToolAssistanceImage {\n /** When Keyboard is specified, ToolAssistanceInstruction.keyboardInfo should be set. */\n Keyboard,\n /** Plus sign */\n AcceptPoint,\n /** Cursor image with click symbol */\n CursorClick,\n /** Mouse image with darkened left button */\n LeftClick,\n /** Mouse image with darkened right button */\n RightClick,\n /** Mouse image with darkened scroll wheel */\n MouseWheel,\n /** Mouse image with darkened left button and left/right arrows */\n LeftClickDrag,\n /** Mouse image with darkened right button and left/right arrows */\n RightClickDrag,\n /** Mouse image with darkened scroll wheel and left/right arrows */\n MouseWheelClickDrag,\n /** Touch image with single finger tapping once */\n OneTouchTap,\n /** Touch image with single finger tapping twice */\n OneTouchDoubleTap,\n /** Touch image with single finger dragging */\n OneTouchDrag,\n /** Touch image with two fingers tapping once */\n TwoTouchTap,\n /** Touch image with two fingers dragging */\n TwoTouchDrag,\n /** Touch image with two fingers pinching */\n TwoTouchPinch,\n /** Touch cursor image with single finger tapping once */\n TouchCursorTap,\n /** Touch cursor image with single finger dragging */\n TouchCursorDrag,\n}\n\n/** Input Method for Tool Assistance instruction\n * @public\n * @extensions\n */\nexport enum ToolAssistanceInputMethod {\n /** Instruction applies to both touch & mouse input methods */\n Both,\n /** Instruction applies to only mouse input method */\n Mouse,\n /** Instruction applies to only touch input method */\n Touch,\n}\n\n/** Identifies one of a set of commonly-used [[ToolAssistance]] messages prompting the user to specify\n * an element or location for a tool operation.\n * @see [[ToolAssistance.translatePrompt]] to obtain a corresponding localized message appropriate for displaying to the user.\n * @public\n * @extensions\n */\nexport type ToolAssistancePromptKey = \"IdentifyElement\" | \"IdentifyPoint\" | \"StartPoint\" | \"EndPoint\";\n\n/** Identifies one of a set of commonly-used [[ToolAssistance]] messages notifying the user of the result of\n * the next input.\n * @see [[ToolAssistance.translateInput]] to obtain a corresponding localizaed message appropriate for displaying to the user.\n * @public\n * @extensions\n */\nexport type ToolAssistanceInputKey = \"AcceptSelection\" | \"AcceptElement\" | \"AcceptPoint\" | \"AdditionalElement\" | \"AdditionalPoint\" | \"Accept\" | \"Complete\" | \"Cancel\" | \"Restart\" | \"Exit\";\n\n/** Tool Assistance image keyboard keys\n * @public\n * @extensions\n */\nexport interface ToolAssistanceKeyboardInfo {\n /** Text for keys to display */\n keys: string[];\n /** If two rows of keys should be displayed, text for the bottom row of keys */\n bottomKeys?: string[];\n}\n\n/** Interface used to describe a Tool Assistance instruction.\n * @public\n * @extensions\n */\nexport interface ToolAssistanceInstruction {\n /** Name of icon WebFont entry, or if specifying an SVG symbol, use \"svg:\" prefix to imported symbol Id.\n * ToolAssistanceImage enum also supported. If ToolAssistanceImage.Keyboard specified, also provide keyboardInfo.\n */\n image: string | ToolAssistanceImage;\n /** Text for the instruction. */\n text: string;\n /** When ToolAssistanceImage.Keyboard is specified for image, information about the Keyboard keys in the image. */\n keyboardInfo?: ToolAssistanceKeyboardInfo;\n /** Indicates whether this instruction is new. Defaults to false. */\n isNew?: boolean;\n /** Input Method to which the instruction applies */\n inputMethod?: ToolAssistanceInputMethod;\n}\n\n/** Interface used to describe a Tool Assistance section with a label and a set of instructions.\n * @public\n * @extensions\n */\nexport interface ToolAssistanceSection {\n /** Instructions in the section. */\n instructions: ToolAssistanceInstruction[];\n /** Label for the section. */\n label?: string;\n}\n\n/** Interface used to describe Tool Assistance for a tool's state.\n * @public\n * @extensions\n */\nexport interface ToolAssistanceInstructions {\n /** The main instruction. */\n mainInstruction: ToolAssistanceInstruction;\n /** Sections of instructions. */\n sections?: ToolAssistanceSection[];\n}\n\n/** Tool Assistance helper methods.\n * @public\n * @extensions\n */\nexport class ToolAssistance {\n\n /** Up key symbol. */\n public static readonly upSymbol: string = \"\\u2bc5\";\n /** Down key symbol. */\n public static readonly downSymbol: string = \"\\u2bc6\";\n /** Left key symbol. */\n public static readonly leftSymbol: string = \"\\u2bc7\";\n /** Right key symbol. */\n public static readonly rightSymbol: string = \"\\u2bc8\";\n\n /** Keyboard info for Arrow keys. */\n public static readonly arrowKeyboardInfo: ToolAssistanceKeyboardInfo = {\n keys: [ToolAssistance.upSymbol],\n bottomKeys: [ToolAssistance.leftSymbol, ToolAssistance.downSymbol, ToolAssistance.rightSymbol],\n };\n\n private static translateKey(key: string) { return IModelApp.localization.getLocalizedString(`${CoreTools.namespace}:toolAssistance.${key}`); }\n private static translateTouch(cursor: string) { return IModelApp.localization.getLocalizedString(`${CoreTools.namespace}:touchCursor.${cursor}`); }\n\n /** Return the translated string for the specified main instruction key */\n public static translatePrompt(key: ToolAssistancePromptKey): string {\n return IModelApp.localization.getLocalizedString(`${CoreTools.tools}ElementSet.Prompts.${key}`);\n }\n\n /** Return the translated string for the specified input instruction key */\n public static translateInput(key: ToolAssistanceInputKey): string {\n return IModelApp.localization.getLocalizedString(`${CoreTools.tools}ElementSet.Inputs.${key}`);\n }\n\n /** Alt key text. */\n public static get altKey(): string {\n return this.translateKey(\"altKey\");\n }\n\n /** Ctrl key text. */\n public static get ctrlKey(): string {\n return this.translateKey(\"ctrlKey\");\n }\n\n /** Shift key text. */\n public static get shiftKey(): string {\n return this.translateKey(\"shiftKey\");\n }\n\n /** Inputs text. */\n public static get inputsLabel(): string {\n return this.translateKey(\"inputs\");\n }\n\n /** Keyboard info for Alt key. */\n public static get altKeyboardInfo(): ToolAssistanceKeyboardInfo {\n return { keys: [ToolAssistance.altKey] };\n }\n\n /** Keyboard info for Ctrl key. */\n public static get ctrlKeyboardInfo(): ToolAssistanceKeyboardInfo {\n return { keys: [ToolAssistance.ctrlKey] };\n }\n\n /** Shift key symbol. */\n public static readonly shiftSymbol: string = \"\\u21e7\";\n\n /** Keyboard info for Shift key with symbol. */\n public static get shiftKeyboardInfo(): ToolAssistanceKeyboardInfo {\n return { keys: [`${ToolAssistance.shiftSymbol} ${ToolAssistance.shiftKey}`] };\n }\n\n /** Keyboard info for Shift key without symbol. */\n public static get shiftKeyboardInfoNoSymbol(): ToolAssistanceKeyboardInfo {\n return { keys: [ToolAssistance.shiftKey] };\n }\n\n /** Keyboard info for Shift key symbol. */\n public static get shiftSymbolKeyboardInfo(): ToolAssistanceKeyboardInfo {\n return { keys: [` ${ToolAssistance.shiftKey} `] };\n }\n\n /** Ctrl key symbol. */\n public static readonly ctrlSymbol: string = \"\\u2038\";\n\n /** Keyboard info for Ctrl key symbol. */\n public static get ctrlSymbolKeyboardInfo(): ToolAssistanceKeyboardInfo {\n return { keys: [ToolAssistance.ctrlSymbol] };\n }\n\n /** Alt key symbol. */\n public static readonly altSymbol: string = \"\\u2387\";\n\n /** Keyboard info for Alt key symbol. */\n public static get altSymbolKeyboardInfo(): ToolAssistanceKeyboardInfo {\n return { keys: [ToolAssistance.altSymbol] };\n }\n\n /** Creates a [[ToolAssistanceInstruction]].\n */\n public static createInstruction(image: string | ToolAssistanceImage, text: string, isNew?: boolean, inputMethod?: ToolAssistanceInputMethod, keyboardInfo?: ToolAssistanceKeyboardInfo): ToolAssistanceInstruction {\n if (inputMethod === undefined)\n inputMethod = ToolAssistanceInputMethod.Both;\n\n const instruction: ToolAssistanceInstruction = {\n image,\n text,\n keyboardInfo,\n isNew,\n inputMethod,\n };\n return instruction;\n }\n\n /** Creates a [[ToolAssistanceInstruction]] with a [[ToolAssistanceKeyboardInfo]].\n */\n public static createKeyboardInstruction(keyboardInfo: ToolAssistanceKeyboardInfo, text: string, isNew?: boolean, inputMethod?: ToolAssistanceInputMethod): ToolAssistanceInstruction {\n if (inputMethod === undefined)\n inputMethod = ToolAssistanceInputMethod.Mouse;\n\n const instruction: ToolAssistanceInstruction = {\n image: ToolAssistanceImage.Keyboard,\n text,\n keyboardInfo,\n isNew,\n inputMethod,\n };\n return instruction;\n }\n\n /** Creates a [[ToolAssistanceInstruction]] with a modifier key and an image.\n */\n public static createModifierKeyInstruction(modifierKey: string, image: string | ToolAssistanceImage, text: string, isNew?: boolean, inputMethod?: ToolAssistanceInputMethod): ToolAssistanceInstruction {\n if (inputMethod === undefined)\n inputMethod = ToolAssistanceInputMethod.Both;\n\n const keyboardInfo = { keys: [modifierKey] };\n\n const instruction: ToolAssistanceInstruction = {\n image,\n text,\n keyboardInfo,\n isNew,\n inputMethod,\n };\n\n return instruction;\n }\n\n /** Creates a [[ToolAssistanceKeyboardInfo]].\n */\n public static createKeyboardInfo(keys: string[], bottomKeys?: string[]): ToolAssistanceKeyboardInfo {\n const keyboardInfo: ToolAssistanceKeyboardInfo = {\n keys,\n bottomKeys,\n };\n return keyboardInfo;\n }\n\n /** Creates instructions for interaction with the touch cursor that are appended to the supplied [[ToolAssistanceInstruction]] array.\n */\n public static createTouchCursorInstructions(instructions: ToolAssistanceInstruction[]): boolean {\n const accuSnap = IModelApp.accuSnap;\n if (undefined === accuSnap.touchCursor && accuSnap.wantVirtualCursor) {\n instructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.OneTouchTap, this.translateTouch(\"Activate\"), false, ToolAssistanceInputMethod.Touch));\n return true;\n } else if (undefined !== accuSnap.touchCursor) {\n instructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.TouchCursorDrag, this.translateTouch(\"IdentifyPoint\"), false, ToolAssistanceInputMethod.Touch));\n instructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.TouchCursorTap, this.translateTouch(\"AcceptPoint\"), false, ToolAssistanceInputMethod.Touch));\n return true;\n }\n return false;\n }\n\n /** Creates a [[ToolAssistanceSection]].\n */\n public static createSection(instructions: ToolAssistanceInstruction[], label?: string): ToolAssistanceSection {\n const section: ToolAssistanceSection = {\n instructions,\n label,\n };\n return section;\n }\n\n /** Creates a [[ToolAssistanceInstructions]].\n */\n public static createInstructions(mainInstruction: ToolAssistanceInstruction, sections?: ToolAssistanceSection[]): ToolAssistanceInstructions {\n const instructions: ToolAssistanceInstructions = {\n mainInstruction,\n sections,\n };\n return instructions;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ToolAssistance.js","sourceRoot":"","sources":["../../../src/tools/ToolAssistance.ts"],"names":[],"mappings":"AACA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC;;;GAGG;AACH,MAAM,CAAN,IAAY,mBAmCX;AAnCD,WAAY,mBAAmB;IAC7B,wFAAwF;IACxF,qEAAQ,CAAA;IACR,gBAAgB;IAChB,2EAAW,CAAA;IACX,qCAAqC;IACrC,2EAAW,CAAA;IACX,4CAA4C;IAC5C,uEAAS,CAAA;IACT,6CAA6C;IAC7C,yEAAU,CAAA;IACV,6CAA6C;IAC7C,yEAAU,CAAA;IACV,kEAAkE;IAClE,+EAAa,CAAA;IACb,mEAAmE;IACnE,iFAAc,CAAA;IACd,mEAAmE;IACnE,2FAAmB,CAAA;IACnB,kDAAkD;IAClD,2EAAW,CAAA;IACX,mDAAmD;IACnD,wFAAiB,CAAA;IACjB,8CAA8C;IAC9C,8EAAY,CAAA;IACZ,gDAAgD;IAChD,4EAAW,CAAA;IACX,4CAA4C;IAC5C,8EAAY,CAAA;IACZ,4CAA4C;IAC5C,gFAAa,CAAA;IACb,yDAAyD;IACzD,kFAAc,C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AAyC,EAAE,KAAc;QACnF,MAAM,OAAO,GAA0B;YACrC,YAAY;YACZ,KAAK;SACN,CAAC;QACF,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;OACG;IACI,MAAM,CAAC,kBAAkB,CAAC,eAA0C,EAAE,QAAkC;QAC7G,MAAM,YAAY,GAA+B;YAC/C,eAAe;YACf,QAAQ;SACT,CAAC;QACF,OAAO,YAAY,CAAC;IACtB,CAAC","sourcesContent":["\n/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tools\n */\n\nimport { IModelApp } from \"../IModelApp\";\nimport { CoreTools } from \"./Tool\";\n\n/** Tool Assistance known images\n * @public\n * @extensions\n */\nexport enum ToolAssistanceImage {\n /** When Keyboard is specified, ToolAssistanceInstruction.keyboardInfo should be set. */\n Keyboard,\n /** Plus sign */\n AcceptPoint,\n /** Cursor image with click symbol */\n CursorClick,\n /** Mouse image with darkened left button */\n LeftClick,\n /** Mouse image with darkened right button */\n RightClick,\n /** Mouse image with darkened scroll wheel */\n MouseWheel,\n /** Mouse image with darkened left button and left/right arrows */\n LeftClickDrag,\n /** Mouse image with darkened right button and left/right arrows */\n RightClickDrag,\n /** Mouse image with darkened scroll wheel and left/right arrows */\n MouseWheelClickDrag,\n /** Touch image with single finger tapping once */\n OneTouchTap,\n /** Touch image with single finger tapping twice */\n OneTouchDoubleTap,\n /** Touch image with single finger dragging */\n OneTouchDrag,\n /** Touch image with two fingers tapping once */\n TwoTouchTap,\n /** Touch image with two fingers dragging */\n TwoTouchDrag,\n /** Touch image with two fingers pinching */\n TwoTouchPinch,\n /** Touch cursor image with single finger tapping once */\n TouchCursorTap,\n /** Touch cursor image with single finger dragging */\n TouchCursorDrag,\n}\n\n/** Input Method for Tool Assistance instruction\n * @public\n * @extensions\n */\nexport enum ToolAssistanceInputMethod {\n /** Instruction applies to both touch & mouse input methods */\n Both,\n /** Instruction applies to only mouse input method */\n Mouse,\n /** Instruction applies to only touch input method */\n Touch,\n}\n\n/** Identifies one of a set of commonly-used [[ToolAssistance]] messages prompting the user to specify\n * an element or location for a tool operation.\n * @see [[ToolAssistance.translatePrompt]] to obtain a corresponding localized message appropriate for displaying to the user.\n * @public\n * @extensions\n */\nexport type ToolAssistancePromptKey = \"IdentifyElement\" | \"IdentifyPoint\" | \"StartPoint\" | \"EndPoint\";\n\n/** Identifies one of a set of commonly-used [[ToolAssistance]] messages notifying the user of the result of\n * the next input.\n * @see [[ToolAssistance.translateInput]] to obtain a corresponding localizaed message appropriate for displaying to the user.\n * @public\n * @extensions\n */\nexport type ToolAssistanceInputKey = \"AcceptSelection\" | \"AcceptElement\" | \"AcceptPoint\" | \"AdditionalElement\" | \"AdditionalPoint\" | \"Accept\" | \"Complete\" | \"Cancel\" | \"Restart\" | \"Exit\";\n\n/** Tool Assistance image keyboard keys\n * @public\n * @extensions\n */\nexport interface ToolAssistanceKeyboardInfo {\n /** Text for keys to display */\n keys: string[];\n /** If two rows of keys should be displayed, text for the bottom row of keys */\n bottomKeys?: string[];\n}\n\n/** Interface used to describe a Tool Assistance instruction.\n * @public\n * @extensions\n */\nexport interface ToolAssistanceInstruction {\n /** Name of icon WebFont entry, or if specifying an SVG symbol, use \"svg:\" prefix to imported symbol Id.\n * ToolAssistanceImage enum also supported. If ToolAssistanceImage.Keyboard specified, also provide keyboardInfo.\n */\n image: string | ToolAssistanceImage;\n /** Text for the instruction. */\n text: string;\n /** When ToolAssistanceImage.Keyboard is specified for image, information about the Keyboard keys in the image. */\n keyboardInfo?: ToolAssistanceKeyboardInfo;\n /** Indicates whether this instruction is new. Defaults to false. */\n isNew?: boolean;\n /** Input Method to which the instruction applies */\n inputMethod?: ToolAssistanceInputMethod;\n}\n\n/** Interface used to describe a Tool Assistance section with a label and a set of instructions.\n * @public\n * @extensions\n */\nexport interface ToolAssistanceSection {\n /** Instructions in the section. */\n instructions: ToolAssistanceInstruction[];\n /** Label for the section. */\n label?: string;\n}\n\n/** Interface used to describe Tool Assistance for a tool's state.\n * @public\n * @extensions\n */\nexport interface ToolAssistanceInstructions {\n /** The main instruction. */\n mainInstruction: ToolAssistanceInstruction;\n /** Sections of instructions. */\n sections?: ToolAssistanceSection[];\n}\n\n/** Tool Assistance helper methods.\n * @public\n * @extensions\n */\nexport class ToolAssistance {\n\n /** Up key symbol. */\n public static readonly upSymbol: string = \"\\u2bc5\";\n /** Down key symbol. */\n public static readonly downSymbol: string = \"\\u2bc6\";\n /** Left key symbol. */\n public static readonly leftSymbol: string = \"\\u2bc7\";\n /** Right key symbol. */\n public static readonly rightSymbol: string = \"\\u2bc8\";\n\n /** Keyboard info for Arrow keys. */\n public static readonly arrowKeyboardInfo: ToolAssistanceKeyboardInfo = {\n keys: [ToolAssistance.upSymbol],\n bottomKeys: [ToolAssistance.leftSymbol, ToolAssistance.downSymbol, ToolAssistance.rightSymbol],\n };\n\n private static translateKey(key: string) { return IModelApp.localization.getLocalizedString(`${CoreTools.namespace}:toolAssistance.${key}`); }\n private static translateTouch(cursor: string) { return IModelApp.localization.getLocalizedString(`${CoreTools.namespace}:touchCursor.${cursor}`); }\n\n /** Return the translated string for the specified main instruction key */\n public static translatePrompt(key: ToolAssistancePromptKey): string {\n return IModelApp.localization.getLocalizedString(`${CoreTools.tools}ElementSet.Prompts.${key}`);\n }\n\n /** Return the translated string for the specified input instruction key */\n public static translateInput(key: ToolAssistanceInputKey): string {\n return IModelApp.localization.getLocalizedString(`${CoreTools.tools}ElementSet.Inputs.${key}`);\n }\n\n /** Alt key text. */\n public static get altKey(): string {\n return this.translateKey(\"altKey\");\n }\n\n /** Ctrl key text. */\n public static get ctrlKey(): string {\n return this.translateKey(\"ctrlKey\");\n }\n\n /** Shift key text. */\n public static get shiftKey(): string {\n return this.translateKey(\"shiftKey\");\n }\n\n /** Inputs text. */\n public static get inputsLabel(): string {\n return this.translateKey(\"inputs\");\n }\n\n /** Keyboard info for Alt key. */\n public static get altKeyboardInfo(): ToolAssistanceKeyboardInfo {\n return { keys: [ToolAssistance.altKey] };\n }\n\n /** Keyboard info for Ctrl key. */\n public static get ctrlKeyboardInfo(): ToolAssistanceKeyboardInfo {\n return { keys: [ToolAssistance.ctrlKey] };\n }\n\n /** Shift key symbol. */\n public static readonly shiftSymbol: string = \"\\u21e7\";\n\n /** Keyboard info for Shift key with symbol. */\n public static get shiftKeyboardInfo(): ToolAssistanceKeyboardInfo {\n return { keys: [`${ToolAssistance.shiftSymbol} ${ToolAssistance.shiftKey}`] };\n }\n\n /** Keyboard info for Shift key without symbol. */\n public static get shiftKeyboardInfoNoSymbol(): ToolAssistanceKeyboardInfo {\n return { keys: [ToolAssistance.shiftKey] };\n }\n\n /** Keyboard info for Shift key symbol. */\n public static get shiftSymbolKeyboardInfo(): ToolAssistanceKeyboardInfo {\n return { keys: [` ${ToolAssistance.shiftKey} `] };\n }\n\n /** Ctrl key symbol. */\n public static readonly ctrlSymbol: string = \"\\u2038\";\n\n /** Keyboard info for Ctrl key symbol. */\n public static get ctrlSymbolKeyboardInfo(): ToolAssistanceKeyboardInfo {\n return { keys: [ToolAssistance.ctrlSymbol] };\n }\n\n /** Alt key symbol. */\n public static readonly altSymbol: string = \"\\u2387\";\n\n /** Keyboard info for Alt key symbol. */\n public static get altSymbolKeyboardInfo(): ToolAssistanceKeyboardInfo {\n return { keys: [ToolAssistance.altSymbol] };\n }\n\n /** Creates a [[ToolAssistanceInstruction]].\n */\n public static createInstruction(image: string | ToolAssistanceImage, text: string, isNew?: boolean, inputMethod?: ToolAssistanceInputMethod, keyboardInfo?: ToolAssistanceKeyboardInfo): ToolAssistanceInstruction {\n if (inputMethod === undefined)\n inputMethod = ToolAssistanceInputMethod.Both;\n\n const instruction: ToolAssistanceInstruction = {\n image,\n text,\n keyboardInfo,\n isNew,\n inputMethod,\n };\n return instruction;\n }\n\n /** Creates a [[ToolAssistanceInstruction]] with a [[ToolAssistanceKeyboardInfo]].\n */\n public static createKeyboardInstruction(keyboardInfo: ToolAssistanceKeyboardInfo, text: string, isNew?: boolean, inputMethod?: ToolAssistanceInputMethod): ToolAssistanceInstruction {\n if (inputMethod === undefined)\n inputMethod = ToolAssistanceInputMethod.Mouse;\n\n const instruction: ToolAssistanceInstruction = {\n image: ToolAssistanceImage.Keyboard,\n text,\n keyboardInfo,\n isNew,\n inputMethod,\n };\n return instruction;\n }\n\n /** Creates a [[ToolAssistanceInstruction]] with a modifier key and an image.\n */\n public static createModifierKeyInstruction(modifierKey: string, image: string | ToolAssistanceImage, text: string, isNew?: boolean, inputMethod?: ToolAssistanceInputMethod): ToolAssistanceInstruction {\n if (inputMethod === undefined)\n inputMethod = ToolAssistanceInputMethod.Both;\n\n const keyboardInfo = { keys: [modifierKey] };\n\n const instruction: ToolAssistanceInstruction = {\n image,\n text,\n keyboardInfo,\n isNew,\n inputMethod,\n };\n\n return instruction;\n }\n\n /** Creates a [[ToolAssistanceKeyboardInfo]].\n */\n public static createKeyboardInfo(keys: string[], bottomKeys?: string[]): ToolAssistanceKeyboardInfo {\n const keyboardInfo: ToolAssistanceKeyboardInfo = {\n keys,\n bottomKeys,\n };\n return keyboardInfo;\n }\n\n /** Creates instructions for interaction with the touch cursor that are appended to the supplied [[ToolAssistanceInstruction]] array.\n */\n public static createTouchCursorInstructions(instructions: ToolAssistanceInstruction[]): boolean {\n const accuSnap = IModelApp.accuSnap;\n if (undefined === accuSnap.touchCursor && accuSnap.wantVirtualCursor) {\n instructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.OneTouchTap, this.translateTouch(\"Activate\"), false, ToolAssistanceInputMethod.Touch));\n return true;\n } else if (undefined !== accuSnap.touchCursor) {\n instructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.TouchCursorDrag, this.translateTouch(\"IdentifyPoint\"), false, ToolAssistanceInputMethod.Touch));\n instructions.push(ToolAssistance.createInstruction(ToolAssistanceImage.TouchCursorTap, this.translateTouch(\"AcceptPoint\"), false, ToolAssistanceInputMethod.Touch));\n return true;\n }\n return false;\n }\n\n /** Creates a [[ToolAssistanceSection]].\n */\n public static createSection(instructions: ToolAssistanceInstruction[], label?: string): ToolAssistanceSection {\n const section: ToolAssistanceSection = {\n instructions,\n label,\n };\n return section;\n }\n\n /** Creates a [[ToolAssistanceInstructions]].\n */\n public static createInstructions(mainInstruction: ToolAssistanceInstruction, sections?: ToolAssistanceSection[]): ToolAssistanceInstructions {\n const instructions: ToolAssistanceInstructions = {\n mainInstruction,\n sections,\n };\n return instructions;\n }\n}\n"]}
|
|
@@ -12,68 +12,68 @@ import { Angle, Constant } from "@itwin/core-geometry";
|
|
|
12
12
|
* @extensions
|
|
13
13
|
*/
|
|
14
14
|
export class ToolSettings {
|
|
15
|
+
/** Two tap must be within this period to be a double tap. */
|
|
16
|
+
static { this.doubleTapTimeout = BeDuration.fromMilliseconds(250); }
|
|
17
|
+
/** Two clicks must be within this period to be a double click. */
|
|
18
|
+
static { this.doubleClickTimeout = BeDuration.fromMilliseconds(500); }
|
|
19
|
+
/** Number of screen inches of movement allowed between clicks to still qualify as a double-click. */
|
|
20
|
+
static { this.doubleClickToleranceInches = 0.05; }
|
|
21
|
+
/** @beta Use virtual cursor to help with locating elements using touch input. By default it's only enabled for snapping. */
|
|
22
|
+
static { this.enableVirtualCursorForLocate = false; }
|
|
23
|
+
/** If true, view rotation tool keeps the up vector (worldZ) aligned with screenY. */
|
|
24
|
+
static { this.preserveWorldUp = true; }
|
|
25
|
+
/** Delay with a touch on the surface before a move operation begins. */
|
|
26
|
+
static { this.touchMoveDelay = BeDuration.fromMilliseconds(50); }
|
|
27
|
+
/** Delay with the mouse down before a drag operation begins. */
|
|
28
|
+
static { this.startDragDelay = BeDuration.fromMilliseconds(110); }
|
|
29
|
+
/** Distance in screen inches a touch point must move before being considered motion. */
|
|
30
|
+
static { this.touchMoveDistanceInches = 0.1; }
|
|
31
|
+
/** Distance in screen inches the cursor must move before a drag operation begins. */
|
|
32
|
+
static { this.startDragDistanceInches = 0.15; }
|
|
33
|
+
/** Distance in screen inches touch points must move apart to be considered a change in zoom scale. */
|
|
34
|
+
static { this.touchZoomChangeThresholdInches = 0.20; }
|
|
35
|
+
/** Radius in screen inches to search for elements that anchor viewing operations. */
|
|
36
|
+
static { this.viewToolPickRadiusInches = 0.20; }
|
|
37
|
+
/** Camera angle enforced for walk tool. */
|
|
38
|
+
static { this.walkCameraAngle = Angle.createDegrees(75.6); }
|
|
39
|
+
/** Whether the walk tool enforces worldZ be aligned with screenY */
|
|
40
|
+
static { this.walkEnforceZUp = false; }
|
|
41
|
+
/** Speed, in meters per second, for the walk tool. */
|
|
42
|
+
static { this.walkVelocity = 3.5; }
|
|
43
|
+
/** @beta Integer increment used to compute a walkVelocity multiplier for the look and move tool, capped at 10x */
|
|
44
|
+
static { this.walkVelocityChange = 0; }
|
|
45
|
+
/** Whether the walk tool requests pointer lock to hide the cursor for mouse look */
|
|
46
|
+
static { this.walkRequestPointerLock = true; }
|
|
47
|
+
/** @beta Whether the look and move tool detects collisions while moving forward */
|
|
48
|
+
static { this.walkCollisions = false; }
|
|
49
|
+
/** @beta Whether the look and move tool adjusts the camera height for stairs/ramps when collisions are enabled */
|
|
50
|
+
static { this.walkDetectFloor = false; }
|
|
51
|
+
/** @beta Maximum step height in meters above floor/ground to use when floor detection is enabled */
|
|
52
|
+
static { this.walkStepHeight = 0.3; }
|
|
53
|
+
/** @beta Camera height in meters above floor/ground to use for set up walk tool */
|
|
54
|
+
static { this.walkEyeHeight = 1.6; }
|
|
55
|
+
/** Scale factor applied for wheel events with "per-line" modifier. */
|
|
56
|
+
static { this.wheelLineFactor = 40; }
|
|
57
|
+
/** Scale factor applied for wheel events with "per-page" modifier. */
|
|
58
|
+
static { this.wheelPageFactor = 120; }
|
|
59
|
+
/** When the zoom-with-wheel tool (with camera enabled) gets closer than this distance to an obstacle, it "bumps" through. */
|
|
60
|
+
static { this.wheelZoomBumpDistance = Constant.oneCentimeter; }
|
|
61
|
+
/** the speed to scroll for the "scroll view" tool (distance per second). */
|
|
62
|
+
static { this.scrollSpeed = .75; }
|
|
63
|
+
/** the speed to zoom for the "zoom view" tool. */
|
|
64
|
+
static { this.zoomSpeed = 10; }
|
|
65
|
+
/** Scale factor for zooming with mouse wheel. */
|
|
66
|
+
static { this.wheelZoomRatio = 1.5; }
|
|
67
|
+
/** Parameters for viewing operations with *inertia* (i.e. they continue briefly if used with a throwing action) */
|
|
68
|
+
static { this.viewingInertia = {
|
|
69
|
+
/** Flag to enable inertia. */
|
|
70
|
+
enabled: true,
|
|
71
|
+
/** How quickly the inertia decays. The smaller the damping value the faster the inertia decays. Must be less than 1.0 */
|
|
72
|
+
damping: .96,
|
|
73
|
+
/** Maximum duration of the inertia operation. Important when frame rates are low. */
|
|
74
|
+
duration: BeDuration.fromMilliseconds(500),
|
|
75
|
+
}; }
|
|
76
|
+
/** Maximum number of times in a second the accuSnap tool's onMotion function is called. */
|
|
77
|
+
static { this.maxOnMotionSnapCallPerSecond = 15; }
|
|
15
78
|
}
|
|
16
|
-
/** Two tap must be within this period to be a double tap. */
|
|
17
|
-
ToolSettings.doubleTapTimeout = BeDuration.fromMilliseconds(250);
|
|
18
|
-
/** Two clicks must be within this period to be a double click. */
|
|
19
|
-
ToolSettings.doubleClickTimeout = BeDuration.fromMilliseconds(500);
|
|
20
|
-
/** Number of screen inches of movement allowed between clicks to still qualify as a double-click. */
|
|
21
|
-
ToolSettings.doubleClickToleranceInches = 0.05;
|
|
22
|
-
/** @beta Use virtual cursor to help with locating elements using touch input. By default it's only enabled for snapping. */
|
|
23
|
-
ToolSettings.enableVirtualCursorForLocate = false;
|
|
24
|
-
/** If true, view rotation tool keeps the up vector (worldZ) aligned with screenY. */
|
|
25
|
-
ToolSettings.preserveWorldUp = true;
|
|
26
|
-
/** Delay with a touch on the surface before a move operation begins. */
|
|
27
|
-
ToolSettings.touchMoveDelay = BeDuration.fromMilliseconds(50);
|
|
28
|
-
/** Delay with the mouse down before a drag operation begins. */
|
|
29
|
-
ToolSettings.startDragDelay = BeDuration.fromMilliseconds(110);
|
|
30
|
-
/** Distance in screen inches a touch point must move before being considered motion. */
|
|
31
|
-
ToolSettings.touchMoveDistanceInches = 0.1;
|
|
32
|
-
/** Distance in screen inches the cursor must move before a drag operation begins. */
|
|
33
|
-
ToolSettings.startDragDistanceInches = 0.15;
|
|
34
|
-
/** Distance in screen inches touch points must move apart to be considered a change in zoom scale. */
|
|
35
|
-
ToolSettings.touchZoomChangeThresholdInches = 0.20;
|
|
36
|
-
/** Radius in screen inches to search for elements that anchor viewing operations. */
|
|
37
|
-
ToolSettings.viewToolPickRadiusInches = 0.20;
|
|
38
|
-
/** Camera angle enforced for walk tool. */
|
|
39
|
-
ToolSettings.walkCameraAngle = Angle.createDegrees(75.6);
|
|
40
|
-
/** Whether the walk tool enforces worldZ be aligned with screenY */
|
|
41
|
-
ToolSettings.walkEnforceZUp = false;
|
|
42
|
-
/** Speed, in meters per second, for the walk tool. */
|
|
43
|
-
ToolSettings.walkVelocity = 3.5;
|
|
44
|
-
/** @beta Integer increment used to compute a walkVelocity multiplier for the look and move tool, capped at 10x */
|
|
45
|
-
ToolSettings.walkVelocityChange = 0;
|
|
46
|
-
/** Whether the walk tool requests pointer lock to hide the cursor for mouse look */
|
|
47
|
-
ToolSettings.walkRequestPointerLock = true;
|
|
48
|
-
/** @beta Whether the look and move tool detects collisions while moving forward */
|
|
49
|
-
ToolSettings.walkCollisions = false;
|
|
50
|
-
/** @beta Whether the look and move tool adjusts the camera height for stairs/ramps when collisions are enabled */
|
|
51
|
-
ToolSettings.walkDetectFloor = false;
|
|
52
|
-
/** @beta Maximum step height in meters above floor/ground to use when floor detection is enabled */
|
|
53
|
-
ToolSettings.walkStepHeight = 0.3;
|
|
54
|
-
/** @beta Camera height in meters above floor/ground to use for set up walk tool */
|
|
55
|
-
ToolSettings.walkEyeHeight = 1.6;
|
|
56
|
-
/** Scale factor applied for wheel events with "per-line" modifier. */
|
|
57
|
-
ToolSettings.wheelLineFactor = 40;
|
|
58
|
-
/** Scale factor applied for wheel events with "per-page" modifier. */
|
|
59
|
-
ToolSettings.wheelPageFactor = 120;
|
|
60
|
-
/** When the zoom-with-wheel tool (with camera enabled) gets closer than this distance to an obstacle, it "bumps" through. */
|
|
61
|
-
ToolSettings.wheelZoomBumpDistance = Constant.oneCentimeter;
|
|
62
|
-
/** the speed to scroll for the "scroll view" tool (distance per second). */
|
|
63
|
-
ToolSettings.scrollSpeed = .75;
|
|
64
|
-
/** the speed to zoom for the "zoom view" tool. */
|
|
65
|
-
ToolSettings.zoomSpeed = 10;
|
|
66
|
-
/** Scale factor for zooming with mouse wheel. */
|
|
67
|
-
ToolSettings.wheelZoomRatio = 1.5;
|
|
68
|
-
/** Parameters for viewing operations with *inertia* (i.e. they continue briefly if used with a throwing action) */
|
|
69
|
-
ToolSettings.viewingInertia = {
|
|
70
|
-
/** Flag to enable inertia. */
|
|
71
|
-
enabled: true,
|
|
72
|
-
/** How quickly the inertia decays. The smaller the damping value the faster the inertia decays. Must be less than 1.0 */
|
|
73
|
-
damping: .96,
|
|
74
|
-
/** Maximum duration of the inertia operation. Important when frame rates are low. */
|
|
75
|
-
duration: BeDuration.fromMilliseconds(500),
|
|
76
|
-
};
|
|
77
|
-
/** Maximum number of times in a second the accuSnap tool's onMotion function is called. */
|
|
78
|
-
ToolSettings.maxOnMotionSnapCallPerSecond = 15;
|
|
79
79
|
//# sourceMappingURL=ToolSettings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolSettings.js","sourceRoot":"","sources":["../../../src/tools/ToolSettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;GAGG;AACH,MAAM,OAAO,YAAY
|
|
1
|
+
{"version":3,"file":"ToolSettings.js","s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AAK,CAAC;IACtC,oGAAoG;aACtF,mBAAc,GAAG,GAAG,CAAC;IACnC,mFAAmF;aACrE,kBAAa,GAAG,GAAG,CAAC;IAClC,sEAAsE;aACxD,oBAAe,GAAG,EAAE,CAAC;IACnC,sEAAsE;aACxD,oBAAe,GAAG,GAAG,CAAC;IACpC,6HAA6H;aAC/G,0BAAqB,GAAG,QAAQ,CAAC,aAAa,CAAC;IAC7D,4EAA4E;aAC9D,gBAAW,GAAG,GAAG,CAAC;IAChC,kDAAkD;aACpC,cAAS,GAAG,EAAE,CAAC;IAC7B,iDAAiD;aACnC,mBAAc,GAAG,GAAG,CAAC;IACnC,mHAAmH;aACrG,mBAAc,GAAG;QAC7B,8BAA8B;QAC9B,OAAO,EAAE,IAAI;QACb,yHAAyH;QACzH,OAAO,EAAE,GAAG;QACZ,qFAAqF;QACrF,QAAQ,EAAE,UAAU,CAAC,gBAAgB,CAAC,GAAG,CAAC;KAC3C,CAAC;IACF,2FAA2F;aAC7E,iCAA4B,GAAG,EAAE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tools\n */\n\nimport { BeDuration } from \"@itwin/core-bentley\";\nimport { Angle, Constant } from \"@itwin/core-geometry\";\n\n/** Settings that control the behavior of built-in tools. Applications may modify these values.\n * @public\n * @extensions\n */\nexport class ToolSettings {\n /** Two tap must be within this period to be a double tap. */\n public static doubleTapTimeout = BeDuration.fromMilliseconds(250);\n /** Two clicks must be within this period to be a double click. */\n public static doubleClickTimeout = BeDuration.fromMilliseconds(500);\n /** Number of screen inches of movement allowed between clicks to still qualify as a double-click. */\n public static doubleClickToleranceInches = 0.05;\n /** @beta Use virtual cursor to help with locating elements using touch input. By default it's only enabled for snapping. */\n public static enableVirtualCursorForLocate = false;\n /** If true, view rotation tool keeps the up vector (worldZ) aligned with screenY. */\n public static preserveWorldUp = true;\n /** Delay with a touch on the surface before a move operation begins. */\n public static touchMoveDelay = BeDuration.fromMilliseconds(50);\n /** Delay with the mouse down before a drag operation begins. */\n public static startDragDelay = BeDuration.fromMilliseconds(110);\n /** Distance in screen inches a touch point must move before being considered motion. */\n public static touchMoveDistanceInches = 0.1;\n /** Distance in screen inches the cursor must move before a drag operation begins. */\n public static startDragDistanceInches = 0.15;\n /** Distance in screen inches touch points must move apart to be considered a change in zoom scale. */\n public static touchZoomChangeThresholdInches = 0.20;\n /** Radius in screen inches to search for elements that anchor viewing operations. */\n public static viewToolPickRadiusInches = 0.20;\n /** Camera angle enforced for walk tool. */\n public static walkCameraAngle = Angle.createDegrees(75.6);\n /** Whether the walk tool enforces worldZ be aligned with screenY */\n public static walkEnforceZUp = false;\n /** Speed, in meters per second, for the walk tool. */\n public static walkVelocity = 3.5;\n /** @beta Integer increment used to compute a walkVelocity multiplier for the look and move tool, capped at 10x */\n public static walkVelocityChange = 0;\n /** Whether the walk tool requests pointer lock to hide the cursor for mouse look */\n public static walkRequestPointerLock = true;\n /** @beta Whether the look and move tool detects collisions while moving forward */\n public static walkCollisions = false;\n /** @beta Whether the look and move tool adjusts the camera height for stairs/ramps when collisions are enabled */\n public static walkDetectFloor = false;\n /** @beta Maximum step height in meters above floor/ground to use when floor detection is enabled */\n public static walkStepHeight = 0.3;\n /** @beta Camera height in meters above floor/ground to use for set up walk tool */\n public static walkEyeHeight = 1.6;\n /** Scale factor applied for wheel events with \"per-line\" modifier. */\n public static wheelLineFactor = 40;\n /** Scale factor applied for wheel events with \"per-page\" modifier. */\n public static wheelPageFactor = 120;\n /** When the zoom-with-wheel tool (with camera enabled) gets closer than this distance to an obstacle, it \"bumps\" through. */\n public static wheelZoomBumpDistance = Constant.oneCentimeter;\n /** the speed to scroll for the \"scroll view\" tool (distance per second). */\n public static scrollSpeed = .75;\n /** the speed to zoom for the \"zoom view\" tool. */\n public static zoomSpeed = 10;\n /** Scale factor for zooming with mouse wheel. */\n public static wheelZoomRatio = 1.5;\n /** Parameters for viewing operations with *inertia* (i.e. they continue briefly if used with a throwing action) */\n public static viewingInertia = {\n /** Flag to enable inertia. */\n enabled: true,\n /** How quickly the inertia decays. The smaller the damping value the faster the inertia decays. Must be less than 1.0 */\n damping: .96,\n /** Maximum duration of the inertia operation. Important when frame rates are low. */\n duration: BeDuration.fromMilliseconds(500),\n };\n /** Maximum number of times in a second the accuSnap tool's onMotion function is called. */\n public static maxOnMotionSnapCallPerSecond = 15;\n}\n"]}
|
|
@@ -2442,6 +2442,8 @@ class ViewFly extends ViewNavigate {
|
|
|
2442
2442
|
* @public
|
|
2443
2443
|
*/
|
|
2444
2444
|
export class PanViewTool extends ViewManip {
|
|
2445
|
+
static { this.toolId = "View.Pan"; }
|
|
2446
|
+
static { this.iconSpec = "icon-hand-2"; }
|
|
2445
2447
|
constructor(vp, oneShot = false, isDraggingRequired = false) {
|
|
2446
2448
|
super(vp, ViewHandleType.Pan, oneShot, isDraggingRequired);
|
|
2447
2449
|
}
|
|
@@ -2450,12 +2452,12 @@ export class PanViewTool extends ViewManip {
|
|
|
2450
2452
|
this.provideToolAssistance("Pan.Prompts.FirstPoint");
|
|
2451
2453
|
}
|
|
2452
2454
|
}
|
|
2453
|
-
PanViewTool.toolId = "View.Pan";
|
|
2454
|
-
PanViewTool.iconSpec = "icon-hand-2";
|
|
2455
2455
|
/** A tool that performs a Rotate view operation
|
|
2456
2456
|
* @public
|
|
2457
2457
|
*/
|
|
2458
2458
|
export class RotateViewTool extends ViewManip {
|
|
2459
|
+
static { this.toolId = "View.Rotate"; }
|
|
2460
|
+
static { this.iconSpec = "icon-gyroscope"; }
|
|
2459
2461
|
constructor(vp, oneShot = false, isDraggingRequired = false) {
|
|
2460
2462
|
super(vp, ViewHandleType.Rotate | ViewHandleType.Pan | ViewHandleType.TargetCenter, oneShot, isDraggingRequired);
|
|
2461
2463
|
}
|
|
@@ -2464,12 +2466,12 @@ export class RotateViewTool extends ViewManip {
|
|
|
2464
2466
|
this.provideToolAssistance("Rotate.Prompts.FirstPoint");
|
|
2465
2467
|
}
|
|
2466
2468
|
}
|
|
2467
|
-
RotateViewTool.toolId = "View.Rotate";
|
|
2468
|
-
RotateViewTool.iconSpec = "icon-gyroscope";
|
|
2469
2469
|
/** A tool that performs the look operation
|
|
2470
2470
|
* @public
|
|
2471
2471
|
*/
|
|
2472
2472
|
export class LookViewTool extends ViewManip {
|
|
2473
|
+
static { this.toolId = "View.Look"; }
|
|
2474
|
+
static { this.iconSpec = "icon-view-navigation"; }
|
|
2473
2475
|
constructor(vp, oneShot = false, isDraggingRequired = false) {
|
|
2474
2476
|
super(vp, ViewHandleType.Look | ViewHandleType.Pan, oneShot, isDraggingRequired);
|
|
2475
2477
|
}
|
|
@@ -2478,12 +2480,12 @@ export class LookViewTool extends ViewManip {
|
|
|
2478
2480
|
this.provideToolAssistance("Look.Prompts.FirstPoint");
|
|
2479
2481
|
}
|
|
2480
2482
|
}
|
|
2481
|
-
LookViewTool.toolId = "View.Look";
|
|
2482
|
-
LookViewTool.iconSpec = "icon-view-navigation";
|
|
2483
2483
|
/** A tool that performs the scroll operation
|
|
2484
2484
|
* @public
|
|
2485
2485
|
*/
|
|
2486
2486
|
export class ScrollViewTool extends ViewManip {
|
|
2487
|
+
static { this.toolId = "View.Scroll"; }
|
|
2488
|
+
static { this.iconSpec = "icon-move"; }
|
|
2487
2489
|
constructor(vp, oneShot = false, isDraggingRequired = false) {
|
|
2488
2490
|
super(vp, ViewHandleType.Scroll, oneShot, isDraggingRequired);
|
|
2489
2491
|
}
|
|
@@ -2492,12 +2494,12 @@ export class ScrollViewTool extends ViewManip {
|
|
|
2492
2494
|
this.provideToolAssistance("Scroll.Prompts.FirstPoint");
|
|
2493
2495
|
}
|
|
2494
2496
|
}
|
|
2495
|
-
ScrollViewTool.toolId = "View.Scroll";
|
|
2496
|
-
ScrollViewTool.iconSpec = "icon-move";
|
|
2497
2497
|
/** A tool that performs the zoom operation
|
|
2498
2498
|
* @public
|
|
2499
2499
|
*/
|
|
2500
2500
|
export class ZoomViewTool extends ViewManip {
|
|
2501
|
+
static { this.toolId = "View.Zoom"; }
|
|
2502
|
+
static { this.iconSpec = "icon-zoom"; }
|
|
2501
2503
|
constructor(vp, oneShot = false, isDraggingRequired = false) {
|
|
2502
2504
|
super(vp, ViewHandleType.Zoom | ViewHandleType.Pan, oneShot, isDraggingRequired);
|
|
2503
2505
|
}
|
|
@@ -2506,8 +2508,6 @@ export class ZoomViewTool extends ViewManip {
|
|
|
2506
2508
|
this.provideToolAssistance("Zoom.Prompts.FirstPoint");
|
|
2507
2509
|
}
|
|
2508
2510
|
}
|
|
2509
|
-
ZoomViewTool.toolId = "View.Zoom";
|
|
2510
|
-
ZoomViewTool.iconSpec = "icon-zoom";
|
|
2511
2511
|
/** A tool that performs the walk operation using mouse+keyboard or touch controls.
|
|
2512
2512
|
* Keyboard and mouse controls are similar to those used by many video games:
|
|
2513
2513
|
* - Mouse motion: look around.
|
|
@@ -2517,6 +2517,8 @@ ZoomViewTool.iconSpec = "icon-zoom";
|
|
|
2517
2517
|
* @public
|
|
2518
2518
|
*/
|
|
2519
2519
|
export class LookAndMoveTool extends ViewManip {
|
|
2520
|
+
static { this.toolId = "View.LookAndMove"; }
|
|
2521
|
+
static { this.iconSpec = "icon-walk"; }
|
|
2520
2522
|
constructor(vp, oneShot = false, isDraggingRequired = false) {
|
|
2521
2523
|
const viewport = (undefined === vp ? IModelApp.viewManager.selectedView : vp); // Need vp to enable camera/check lens in onReinitialize...
|
|
2522
2524
|
super(viewport, ViewHandleType.LookAndMove | ViewHandleType.Pan, oneShot, isDraggingRequired);
|
|
@@ -2554,12 +2556,12 @@ export class LookAndMoveTool extends ViewManip {
|
|
|
2554
2556
|
IModelApp.notifications.setToolAssistance(instructions);
|
|
2555
2557
|
}
|
|
2556
2558
|
}
|
|
2557
|
-
LookAndMoveTool.toolId = "View.LookAndMove";
|
|
2558
|
-
LookAndMoveTool.iconSpec = "icon-walk";
|
|
2559
2559
|
/** A tool that performs the walk operation
|
|
2560
2560
|
* @public
|
|
2561
2561
|
*/
|
|
2562
2562
|
export class WalkViewTool extends ViewManip {
|
|
2563
|
+
static { this.toolId = "View.Walk"; }
|
|
2564
|
+
static { this.iconSpec = "icon-walk"; }
|
|
2563
2565
|
constructor(vp, oneShot = false, isDraggingRequired = false) {
|
|
2564
2566
|
const viewport = (undefined === vp ? IModelApp.viewManager.selectedView : vp); // Need vp to enable camera/check lens in onReinitialize...
|
|
2565
2567
|
super(viewport, ViewHandleType.Walk | ViewHandleType.Pan, oneShot, isDraggingRequired);
|
|
@@ -2576,12 +2578,12 @@ export class WalkViewTool extends ViewManip {
|
|
|
2576
2578
|
super.provideToolAssistance(mainInstrKey, walkInstructions);
|
|
2577
2579
|
}
|
|
2578
2580
|
}
|
|
2579
|
-
WalkViewTool.toolId = "View.Walk";
|
|
2580
|
-
WalkViewTool.iconSpec = "icon-walk";
|
|
2581
2581
|
/** A tool that performs the fly operation
|
|
2582
2582
|
* @public
|
|
2583
2583
|
*/
|
|
2584
2584
|
export class FlyViewTool extends ViewManip {
|
|
2585
|
+
static { this.toolId = "View.Fly"; }
|
|
2586
|
+
static { this.iconSpec = "icon-airplane"; }
|
|
2585
2587
|
constructor(vp, oneShot = false, isDraggingRequired = false) {
|
|
2586
2588
|
super(vp, ViewHandleType.Fly | ViewHandleType.Pan, oneShot, isDraggingRequired);
|
|
2587
2589
|
}
|
|
@@ -2597,12 +2599,12 @@ export class FlyViewTool extends ViewManip {
|
|
|
2597
2599
|
super.provideToolAssistance(mainInstrKey, flyInstructions);
|
|
2598
2600
|
}
|
|
2599
2601
|
}
|
|
2600
|
-
FlyViewTool.toolId = "View.Fly";
|
|
2601
|
-
FlyViewTool.iconSpec = "icon-airplane";
|
|
2602
2602
|
/** A tool that performs a fit view
|
|
2603
2603
|
* @public
|
|
2604
2604
|
*/
|
|
2605
2605
|
export class FitViewTool extends ViewTool {
|
|
2606
|
+
static { this.toolId = "View.Fit"; }
|
|
2607
|
+
static { this.iconSpec = "icon-fit-to-view"; }
|
|
2606
2608
|
constructor(viewport, oneShot, doAnimate = true, isolatedOnly = true) {
|
|
2607
2609
|
super(viewport);
|
|
2608
2610
|
this.viewport = viewport;
|
|
@@ -2647,12 +2649,11 @@ export class FitViewTool extends ViewTool {
|
|
|
2647
2649
|
return oneShot;
|
|
2648
2650
|
}
|
|
2649
2651
|
}
|
|
2650
|
-
FitViewTool.toolId = "View.Fit";
|
|
2651
|
-
FitViewTool.iconSpec = "icon-fit-to-view";
|
|
2652
2652
|
/** A tool that views a location on the background map from a satellite's perspective; the viewed location is derived from the position of the current camera's eye above the background map. Operates on the selected view.
|
|
2653
2653
|
* @public
|
|
2654
2654
|
*/
|
|
2655
2655
|
export class ViewGlobeSatelliteTool extends ViewTool {
|
|
2656
|
+
static { this.toolId = "View.GlobeSatellite"; }
|
|
2656
2657
|
constructor(viewport, oneShot = true, doAnimate = true) {
|
|
2657
2658
|
super(viewport);
|
|
2658
2659
|
this.viewport = viewport;
|
|
@@ -2697,11 +2698,11 @@ export class ViewGlobeSatelliteTool extends ViewTool {
|
|
|
2697
2698
|
return oneShot;
|
|
2698
2699
|
}
|
|
2699
2700
|
}
|
|
2700
|
-
ViewGlobeSatelliteTool.toolId = "View.GlobeSatellite";
|
|
2701
2701
|
/** A tool that views a location on the background map from a bird's eye perspective; the viewed location is derived from the position of the current camera's eye above the background map. Operates on the selected view.
|
|
2702
2702
|
* @public
|
|
2703
2703
|
*/
|
|
2704
2704
|
export class ViewGlobeBirdTool extends ViewTool {
|
|
2705
|
+
static { this.toolId = "View.GlobeBird"; }
|
|
2705
2706
|
constructor(viewport, oneShot = true, doAnimate = true) {
|
|
2706
2707
|
super(viewport);
|
|
2707
2708
|
this.viewport = viewport;
|
|
@@ -2743,13 +2744,13 @@ export class ViewGlobeBirdTool extends ViewTool {
|
|
|
2743
2744
|
return oneShot;
|
|
2744
2745
|
}
|
|
2745
2746
|
}
|
|
2746
|
-
ViewGlobeBirdTool.toolId = "View.GlobeBird";
|
|
2747
2747
|
/** A tool that views a location on the background map corresponding to a specified string.
|
|
2748
2748
|
* This will either look down at the location using a bird's eye height, or, if a range is available, the entire range corresponding to the location will be viewed.
|
|
2749
2749
|
* Operates on the selected view.
|
|
2750
2750
|
* @public
|
|
2751
2751
|
*/
|
|
2752
2752
|
export class ViewGlobeLocationTool extends ViewTool {
|
|
2753
|
+
static { this.toolId = "View.GlobeLocation"; }
|
|
2753
2754
|
constructor(viewport, oneShot = true, doAnimate = true) {
|
|
2754
2755
|
super(viewport);
|
|
2755
2756
|
this.viewport = viewport;
|
|
@@ -2809,11 +2810,11 @@ export class ViewGlobeLocationTool extends ViewTool {
|
|
|
2809
2810
|
return this.oneShot;
|
|
2810
2811
|
}
|
|
2811
2812
|
}
|
|
2812
|
-
ViewGlobeLocationTool.toolId = "View.GlobeLocation";
|
|
2813
2813
|
/** A tool that views the current iModel on the background map so that the extent of the project is visible. Operates on the selected view.
|
|
2814
2814
|
* @public
|
|
2815
2815
|
*/
|
|
2816
2816
|
export class ViewGlobeIModelTool extends ViewTool {
|
|
2817
|
+
static { this.toolId = "View.GlobeIModel"; }
|
|
2817
2818
|
constructor(viewport, oneShot = true, doAnimate = true) {
|
|
2818
2819
|
super(viewport);
|
|
2819
2820
|
this.viewport = viewport;
|
|
@@ -2850,11 +2851,12 @@ export class ViewGlobeIModelTool extends ViewTool {
|
|
|
2850
2851
|
return this.oneShot;
|
|
2851
2852
|
}
|
|
2852
2853
|
}
|
|
2853
|
-
ViewGlobeIModelTool.toolId = "View.GlobeIModel";
|
|
2854
2854
|
/** A tool that rotates the view to one of the standard views.
|
|
2855
2855
|
* @public
|
|
2856
2856
|
*/
|
|
2857
2857
|
export class StandardViewTool extends ViewTool {
|
|
2858
|
+
static { this.toolId = "View.Standard"; }
|
|
2859
|
+
static { this.iconSpec = "icon-cube-faces-top"; }
|
|
2858
2860
|
constructor(viewport, _standardViewId) {
|
|
2859
2861
|
super(viewport);
|
|
2860
2862
|
this._standardViewId = _standardViewId;
|
|
@@ -2878,8 +2880,6 @@ export class StandardViewTool extends ViewTool {
|
|
|
2878
2880
|
return this.exitTool();
|
|
2879
2881
|
}
|
|
2880
2882
|
}
|
|
2881
|
-
StandardViewTool.toolId = "View.Standard";
|
|
2882
|
-
StandardViewTool.iconSpec = "icon-cube-faces-top";
|
|
2883
2883
|
/** A tool that performs a Window-area view operation
|
|
2884
2884
|
* @public
|
|
2885
2885
|
*/
|
|
@@ -2893,6 +2893,8 @@ export class WindowAreaTool extends ViewTool {
|
|
|
2893
2893
|
this._shapePts = [new Point3d(), new Point3d(), new Point3d(), new Point3d(), new Point3d()];
|
|
2894
2894
|
this._fillColor = ColorDef.from(0, 0, 255, 200);
|
|
2895
2895
|
}
|
|
2896
|
+
static { this.toolId = "View.WindowArea"; }
|
|
2897
|
+
static { this.iconSpec = "icon-window-area"; }
|
|
2896
2898
|
async onPostInstall() {
|
|
2897
2899
|
await super.onPostInstall();
|
|
2898
2900
|
this.provideToolAssistance();
|
|
@@ -3116,10 +3118,9 @@ export class WindowAreaTool extends ViewTool {
|
|
|
3116
3118
|
vp.synchWithView({ animateFrustumChange: true, globalAlignment });
|
|
3117
3119
|
}
|
|
3118
3120
|
}
|
|
3119
|
-
WindowAreaTool.toolId = "View.WindowArea";
|
|
3120
|
-
WindowAreaTool.iconSpec = "icon-window-area";
|
|
3121
3121
|
/** @internal */
|
|
3122
3122
|
export class DefaultViewTouchTool extends ViewManip {
|
|
3123
|
+
static { this.toolId = ""; } // touch tools installed by IdleTool are never registered
|
|
3123
3124
|
/** Move this handle during the inertia duration */
|
|
3124
3125
|
animate() {
|
|
3125
3126
|
if (undefined === this._inertiaVec)
|
|
@@ -3335,35 +3336,36 @@ export class DefaultViewTouchTool extends ViewManip {
|
|
|
3335
3336
|
return this.exitTool();
|
|
3336
3337
|
}
|
|
3337
3338
|
}
|
|
3338
|
-
DefaultViewTouchTool.toolId = ""; // touch tools installed by IdleTool are never registered
|
|
3339
3339
|
/** A tool that performs view undo operation. An application could also just call Viewport.doUndo directly, creating a ViewTool isn't required.
|
|
3340
3340
|
* @public
|
|
3341
3341
|
*/
|
|
3342
3342
|
export class ViewUndoTool extends ViewTool {
|
|
3343
|
+
static { this.toolId = "View.Undo"; }
|
|
3344
|
+
static { this.iconSpec = "icon-window-backward"; }
|
|
3343
3345
|
async onPostInstall() {
|
|
3344
3346
|
if (this.viewport)
|
|
3345
3347
|
this.viewport.doUndo(ScreenViewport.animation.time.normal);
|
|
3346
3348
|
return this.exitTool();
|
|
3347
3349
|
}
|
|
3348
3350
|
}
|
|
3349
|
-
ViewUndoTool.toolId = "View.Undo";
|
|
3350
|
-
ViewUndoTool.iconSpec = "icon-window-backward";
|
|
3351
3351
|
/** A tool that performs view redo operation. An application could also just call Viewport.doRedo directly, creating a ViewTool isn't required.
|
|
3352
3352
|
* @public
|
|
3353
3353
|
*/
|
|
3354
3354
|
export class ViewRedoTool extends ViewTool {
|
|
3355
|
+
static { this.toolId = "View.Redo"; }
|
|
3356
|
+
static { this.iconSpec = "icon-window-forward"; }
|
|
3355
3357
|
async onPostInstall() {
|
|
3356
3358
|
if (this.viewport)
|
|
3357
3359
|
this.viewport.doRedo(ScreenViewport.animation.time.normal);
|
|
3358
3360
|
return this.exitTool();
|
|
3359
3361
|
}
|
|
3360
3362
|
}
|
|
3361
|
-
ViewRedoTool.toolId = "View.Redo";
|
|
3362
|
-
ViewRedoTool.iconSpec = "icon-window-forward";
|
|
3363
3363
|
/** A tool that toggles the camera on/off in a spatial view
|
|
3364
3364
|
* @public
|
|
3365
3365
|
*/
|
|
3366
3366
|
export class ViewToggleCameraTool extends ViewTool {
|
|
3367
|
+
static { this.toolId = "View.ToggleCamera"; }
|
|
3368
|
+
static { this.iconSpec = "icon-camera"; }
|
|
3367
3369
|
async onInstall() { return (undefined !== this.viewport && this.viewport.view.allow3dManipulations()); }
|
|
3368
3370
|
async onPostInstall() {
|
|
3369
3371
|
if (this.viewport) {
|
|
@@ -3377,8 +3379,6 @@ export class ViewToggleCameraTool extends ViewTool {
|
|
|
3377
3379
|
return this.exitTool();
|
|
3378
3380
|
}
|
|
3379
3381
|
}
|
|
3380
|
-
ViewToggleCameraTool.toolId = "View.ToggleCamera";
|
|
3381
|
-
ViewToggleCameraTool.iconSpec = "icon-camera";
|
|
3382
3382
|
/** A tool that sets the view camera by two points. This is a PrimitiveTool and not a ViewTool to allow the view to be panned, zoomed, and rotated while defining the points.
|
|
3383
3383
|
* To show tool settings for specifying camera and target heights above the snap point, make sure formatting and parsing data are cached before the tool starts
|
|
3384
3384
|
* by calling QuantityFormatter.onInitialized at app startup.
|
|
@@ -3391,6 +3391,8 @@ export class SetupCameraTool extends PrimitiveTool {
|
|
|
3391
3391
|
this._eyePtWorld = Point3d.create();
|
|
3392
3392
|
this._targetPtWorld = Point3d.create();
|
|
3393
3393
|
}
|
|
3394
|
+
static { this.toolId = "View.SetupCamera"; }
|
|
3395
|
+
static { this.iconSpec = "icon-camera-location"; }
|
|
3394
3396
|
isCompatibleViewport(vp, isSelectedViewChange) { return (super.isCompatibleViewport(vp, isSelectedViewChange) && undefined !== vp && vp.view.allow3dManipulations()); }
|
|
3395
3397
|
isValidLocation(_ev, _isButtonEvent) { return true; }
|
|
3396
3398
|
requireWriteableTarget() { return false; }
|
|
@@ -3637,8 +3639,6 @@ export class SetupCameraTool extends PrimitiveTool {
|
|
|
3637
3639
|
return toolSettings;
|
|
3638
3640
|
}
|
|
3639
3641
|
}
|
|
3640
|
-
SetupCameraTool.toolId = "View.SetupCamera";
|
|
3641
|
-
SetupCameraTool.iconSpec = "icon-camera-location";
|
|
3642
3642
|
/** A tool that sets a walk tool starting position by a floor point and look direction. This is a PrimitiveTool and not a ViewTool to allow the view to be panned, zoomed, and rotated while defining the points.
|
|
3643
3643
|
* @public
|
|
3644
3644
|
*/
|
|
@@ -3649,6 +3649,8 @@ export class SetupWalkCameraTool extends PrimitiveTool {
|
|
|
3649
3649
|
this._eyePtWorld = Point3d.create();
|
|
3650
3650
|
this._targetPtWorld = Point3d.create();
|
|
3651
3651
|
}
|
|
3652
|
+
static { this.toolId = "View.SetupWalkCamera"; }
|
|
3653
|
+
static { this.iconSpec = "icon-camera-location"; }
|
|
3652
3654
|
isCompatibleViewport(vp, isSelectedViewChange) { return (super.isCompatibleViewport(vp, isSelectedViewChange) && undefined !== vp && vp.view.allow3dManipulations()); }
|
|
3653
3655
|
isValidLocation(_ev, _isButtonEvent) { return true; }
|
|
3654
3656
|
requireWriteableTarget() { return false; }
|
|
@@ -3817,6 +3819,4 @@ export class SetupWalkCameraTool extends PrimitiveTool {
|
|
|
3817
3819
|
vp.synchWithView({ animateFrustumChange: true });
|
|
3818
3820
|
}
|
|
3819
3821
|
}
|
|
3820
|
-
SetupWalkCameraTool.toolId = "View.SetupWalkCamera";
|
|
3821
|
-
SetupWalkCameraTool.iconSpec = "icon-camera-location";
|
|
3822
3822
|
//# sourceMappingURL=ViewTool.js.map
|