@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
|
@@ -69,6 +69,19 @@ var ToolAssistanceInputMethod;
|
|
|
69
69
|
* @extensions
|
|
70
70
|
*/
|
|
71
71
|
class ToolAssistance {
|
|
72
|
+
/** Up key symbol. */
|
|
73
|
+
static { this.upSymbol = "\u2bc5"; }
|
|
74
|
+
/** Down key symbol. */
|
|
75
|
+
static { this.downSymbol = "\u2bc6"; }
|
|
76
|
+
/** Left key symbol. */
|
|
77
|
+
static { this.leftSymbol = "\u2bc7"; }
|
|
78
|
+
/** Right key symbol. */
|
|
79
|
+
static { this.rightSymbol = "\u2bc8"; }
|
|
80
|
+
/** Keyboard info for Arrow keys. */
|
|
81
|
+
static { this.arrowKeyboardInfo = {
|
|
82
|
+
keys: [ToolAssistance.upSymbol],
|
|
83
|
+
bottomKeys: [ToolAssistance.leftSymbol, ToolAssistance.downSymbol, ToolAssistance.rightSymbol],
|
|
84
|
+
}; }
|
|
72
85
|
static translateKey(key) { return IModelApp_1.IModelApp.localization.getLocalizedString(`${Tool_1.CoreTools.namespace}:toolAssistance.${key}`); }
|
|
73
86
|
static translateTouch(cursor) { return IModelApp_1.IModelApp.localization.getLocalizedString(`${Tool_1.CoreTools.namespace}:touchCursor.${cursor}`); }
|
|
74
87
|
/** Return the translated string for the specified main instruction key */
|
|
@@ -103,6 +116,8 @@ class ToolAssistance {
|
|
|
103
116
|
static get ctrlKeyboardInfo() {
|
|
104
117
|
return { keys: [ToolAssistance.ctrlKey] };
|
|
105
118
|
}
|
|
119
|
+
/** Shift key symbol. */
|
|
120
|
+
static { this.shiftSymbol = "\u21e7"; }
|
|
106
121
|
/** Keyboard info for Shift key with symbol. */
|
|
107
122
|
static get shiftKeyboardInfo() {
|
|
108
123
|
return { keys: [`${ToolAssistance.shiftSymbol} ${ToolAssistance.shiftKey}`] };
|
|
@@ -115,10 +130,14 @@ class ToolAssistance {
|
|
|
115
130
|
static get shiftSymbolKeyboardInfo() {
|
|
116
131
|
return { keys: [` ${ToolAssistance.shiftKey} `] };
|
|
117
132
|
}
|
|
133
|
+
/** Ctrl key symbol. */
|
|
134
|
+
static { this.ctrlSymbol = "\u2038"; }
|
|
118
135
|
/** Keyboard info for Ctrl key symbol. */
|
|
119
136
|
static get ctrlSymbolKeyboardInfo() {
|
|
120
137
|
return { keys: [ToolAssistance.ctrlSymbol] };
|
|
121
138
|
}
|
|
139
|
+
/** Alt key symbol. */
|
|
140
|
+
static { this.altSymbol = "\u2387"; }
|
|
122
141
|
/** Keyboard info for Alt key symbol. */
|
|
123
142
|
static get altSymbolKeyboardInfo() {
|
|
124
143
|
return { keys: [ToolAssistance.altSymbol] };
|
|
@@ -210,23 +229,4 @@ class ToolAssistance {
|
|
|
210
229
|
}
|
|
211
230
|
}
|
|
212
231
|
exports.ToolAssistance = ToolAssistance;
|
|
213
|
-
/** Up key symbol. */
|
|
214
|
-
ToolAssistance.upSymbol = "\u2bc5";
|
|
215
|
-
/** Down key symbol. */
|
|
216
|
-
ToolAssistance.downSymbol = "\u2bc6";
|
|
217
|
-
/** Left key symbol. */
|
|
218
|
-
ToolAssistance.leftSymbol = "\u2bc7";
|
|
219
|
-
/** Right key symbol. */
|
|
220
|
-
ToolAssistance.rightSymbol = "\u2bc8";
|
|
221
|
-
/** Keyboard info for Arrow keys. */
|
|
222
|
-
ToolAssistance.arrowKeyboardInfo = {
|
|
223
|
-
keys: [ToolAssistance.upSymbol],
|
|
224
|
-
bottomKeys: [ToolAssistance.leftSymbol, ToolAssistance.downSymbol, ToolAssistance.rightSymbol],
|
|
225
|
-
};
|
|
226
|
-
/** Shift key symbol. */
|
|
227
|
-
ToolAssistance.shiftSymbol = "\u21e7";
|
|
228
|
-
/** Ctrl key symbol. */
|
|
229
|
-
ToolAssistance.ctrlSymbol = "\u2038";
|
|
230
|
-
/** Alt key symbol. */
|
|
231
|
-
ToolAssistance.altSymbol = "\u2387";
|
|
232
232
|
//# 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,4CAAyC;AACzC,iCAAmC;AAEnC;;;GAGG;AACH,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,yDAAy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AAiB,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,4CAAyC;AACzC,iCAAmC;AAEnC;;;GAGG;AACH,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,CAAA;IACd,qDAAqD;IACrD,oFAAe,CAAA;AACjB,CAAC,EAnCW,mBAAmB,mCAAnB,mBAAmB,QAmC9B;AAED;;;GAG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,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;;AA5LH,wCA6LC","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"]}
|
|
@@ -15,69 +15,69 @@ const core_geometry_1 = require("@itwin/core-geometry");
|
|
|
15
15
|
* @extensions
|
|
16
16
|
*/
|
|
17
17
|
class ToolSettings {
|
|
18
|
+
/** Two tap must be within this period to be a double tap. */
|
|
19
|
+
static { this.doubleTapTimeout = core_bentley_1.BeDuration.fromMilliseconds(250); }
|
|
20
|
+
/** Two clicks must be within this period to be a double click. */
|
|
21
|
+
static { this.doubleClickTimeout = core_bentley_1.BeDuration.fromMilliseconds(500); }
|
|
22
|
+
/** Number of screen inches of movement allowed between clicks to still qualify as a double-click. */
|
|
23
|
+
static { this.doubleClickToleranceInches = 0.05; }
|
|
24
|
+
/** @beta Use virtual cursor to help with locating elements using touch input. By default it's only enabled for snapping. */
|
|
25
|
+
static { this.enableVirtualCursorForLocate = false; }
|
|
26
|
+
/** If true, view rotation tool keeps the up vector (worldZ) aligned with screenY. */
|
|
27
|
+
static { this.preserveWorldUp = true; }
|
|
28
|
+
/** Delay with a touch on the surface before a move operation begins. */
|
|
29
|
+
static { this.touchMoveDelay = core_bentley_1.BeDuration.fromMilliseconds(50); }
|
|
30
|
+
/** Delay with the mouse down before a drag operation begins. */
|
|
31
|
+
static { this.startDragDelay = core_bentley_1.BeDuration.fromMilliseconds(110); }
|
|
32
|
+
/** Distance in screen inches a touch point must move before being considered motion. */
|
|
33
|
+
static { this.touchMoveDistanceInches = 0.1; }
|
|
34
|
+
/** Distance in screen inches the cursor must move before a drag operation begins. */
|
|
35
|
+
static { this.startDragDistanceInches = 0.15; }
|
|
36
|
+
/** Distance in screen inches touch points must move apart to be considered a change in zoom scale. */
|
|
37
|
+
static { this.touchZoomChangeThresholdInches = 0.20; }
|
|
38
|
+
/** Radius in screen inches to search for elements that anchor viewing operations. */
|
|
39
|
+
static { this.viewToolPickRadiusInches = 0.20; }
|
|
40
|
+
/** Camera angle enforced for walk tool. */
|
|
41
|
+
static { this.walkCameraAngle = core_geometry_1.Angle.createDegrees(75.6); }
|
|
42
|
+
/** Whether the walk tool enforces worldZ be aligned with screenY */
|
|
43
|
+
static { this.walkEnforceZUp = false; }
|
|
44
|
+
/** Speed, in meters per second, for the walk tool. */
|
|
45
|
+
static { this.walkVelocity = 3.5; }
|
|
46
|
+
/** @beta Integer increment used to compute a walkVelocity multiplier for the look and move tool, capped at 10x */
|
|
47
|
+
static { this.walkVelocityChange = 0; }
|
|
48
|
+
/** Whether the walk tool requests pointer lock to hide the cursor for mouse look */
|
|
49
|
+
static { this.walkRequestPointerLock = true; }
|
|
50
|
+
/** @beta Whether the look and move tool detects collisions while moving forward */
|
|
51
|
+
static { this.walkCollisions = false; }
|
|
52
|
+
/** @beta Whether the look and move tool adjusts the camera height for stairs/ramps when collisions are enabled */
|
|
53
|
+
static { this.walkDetectFloor = false; }
|
|
54
|
+
/** @beta Maximum step height in meters above floor/ground to use when floor detection is enabled */
|
|
55
|
+
static { this.walkStepHeight = 0.3; }
|
|
56
|
+
/** @beta Camera height in meters above floor/ground to use for set up walk tool */
|
|
57
|
+
static { this.walkEyeHeight = 1.6; }
|
|
58
|
+
/** Scale factor applied for wheel events with "per-line" modifier. */
|
|
59
|
+
static { this.wheelLineFactor = 40; }
|
|
60
|
+
/** Scale factor applied for wheel events with "per-page" modifier. */
|
|
61
|
+
static { this.wheelPageFactor = 120; }
|
|
62
|
+
/** When the zoom-with-wheel tool (with camera enabled) gets closer than this distance to an obstacle, it "bumps" through. */
|
|
63
|
+
static { this.wheelZoomBumpDistance = core_geometry_1.Constant.oneCentimeter; }
|
|
64
|
+
/** the speed to scroll for the "scroll view" tool (distance per second). */
|
|
65
|
+
static { this.scrollSpeed = .75; }
|
|
66
|
+
/** the speed to zoom for the "zoom view" tool. */
|
|
67
|
+
static { this.zoomSpeed = 10; }
|
|
68
|
+
/** Scale factor for zooming with mouse wheel. */
|
|
69
|
+
static { this.wheelZoomRatio = 1.5; }
|
|
70
|
+
/** Parameters for viewing operations with *inertia* (i.e. they continue briefly if used with a throwing action) */
|
|
71
|
+
static { this.viewingInertia = {
|
|
72
|
+
/** Flag to enable inertia. */
|
|
73
|
+
enabled: true,
|
|
74
|
+
/** How quickly the inertia decays. The smaller the damping value the faster the inertia decays. Must be less than 1.0 */
|
|
75
|
+
damping: .96,
|
|
76
|
+
/** Maximum duration of the inertia operation. Important when frame rates are low. */
|
|
77
|
+
duration: core_bentley_1.BeDuration.fromMilliseconds(500),
|
|
78
|
+
}; }
|
|
79
|
+
/** Maximum number of times in a second the accuSnap tool's onMotion function is called. */
|
|
80
|
+
static { this.maxOnMotionSnapCallPerSecond = 15; }
|
|
18
81
|
}
|
|
19
82
|
exports.ToolSettings = ToolSettings;
|
|
20
|
-
/** Two tap must be within this period to be a double tap. */
|
|
21
|
-
ToolSettings.doubleTapTimeout = core_bentley_1.BeDuration.fromMilliseconds(250);
|
|
22
|
-
/** Two clicks must be within this period to be a double click. */
|
|
23
|
-
ToolSettings.doubleClickTimeout = core_bentley_1.BeDuration.fromMilliseconds(500);
|
|
24
|
-
/** Number of screen inches of movement allowed between clicks to still qualify as a double-click. */
|
|
25
|
-
ToolSettings.doubleClickToleranceInches = 0.05;
|
|
26
|
-
/** @beta Use virtual cursor to help with locating elements using touch input. By default it's only enabled for snapping. */
|
|
27
|
-
ToolSettings.enableVirtualCursorForLocate = false;
|
|
28
|
-
/** If true, view rotation tool keeps the up vector (worldZ) aligned with screenY. */
|
|
29
|
-
ToolSettings.preserveWorldUp = true;
|
|
30
|
-
/** Delay with a touch on the surface before a move operation begins. */
|
|
31
|
-
ToolSettings.touchMoveDelay = core_bentley_1.BeDuration.fromMilliseconds(50);
|
|
32
|
-
/** Delay with the mouse down before a drag operation begins. */
|
|
33
|
-
ToolSettings.startDragDelay = core_bentley_1.BeDuration.fromMilliseconds(110);
|
|
34
|
-
/** Distance in screen inches a touch point must move before being considered motion. */
|
|
35
|
-
ToolSettings.touchMoveDistanceInches = 0.1;
|
|
36
|
-
/** Distance in screen inches the cursor must move before a drag operation begins. */
|
|
37
|
-
ToolSettings.startDragDistanceInches = 0.15;
|
|
38
|
-
/** Distance in screen inches touch points must move apart to be considered a change in zoom scale. */
|
|
39
|
-
ToolSettings.touchZoomChangeThresholdInches = 0.20;
|
|
40
|
-
/** Radius in screen inches to search for elements that anchor viewing operations. */
|
|
41
|
-
ToolSettings.viewToolPickRadiusInches = 0.20;
|
|
42
|
-
/** Camera angle enforced for walk tool. */
|
|
43
|
-
ToolSettings.walkCameraAngle = core_geometry_1.Angle.createDegrees(75.6);
|
|
44
|
-
/** Whether the walk tool enforces worldZ be aligned with screenY */
|
|
45
|
-
ToolSettings.walkEnforceZUp = false;
|
|
46
|
-
/** Speed, in meters per second, for the walk tool. */
|
|
47
|
-
ToolSettings.walkVelocity = 3.5;
|
|
48
|
-
/** @beta Integer increment used to compute a walkVelocity multiplier for the look and move tool, capped at 10x */
|
|
49
|
-
ToolSettings.walkVelocityChange = 0;
|
|
50
|
-
/** Whether the walk tool requests pointer lock to hide the cursor for mouse look */
|
|
51
|
-
ToolSettings.walkRequestPointerLock = true;
|
|
52
|
-
/** @beta Whether the look and move tool detects collisions while moving forward */
|
|
53
|
-
ToolSettings.walkCollisions = false;
|
|
54
|
-
/** @beta Whether the look and move tool adjusts the camera height for stairs/ramps when collisions are enabled */
|
|
55
|
-
ToolSettings.walkDetectFloor = false;
|
|
56
|
-
/** @beta Maximum step height in meters above floor/ground to use when floor detection is enabled */
|
|
57
|
-
ToolSettings.walkStepHeight = 0.3;
|
|
58
|
-
/** @beta Camera height in meters above floor/ground to use for set up walk tool */
|
|
59
|
-
ToolSettings.walkEyeHeight = 1.6;
|
|
60
|
-
/** Scale factor applied for wheel events with "per-line" modifier. */
|
|
61
|
-
ToolSettings.wheelLineFactor = 40;
|
|
62
|
-
/** Scale factor applied for wheel events with "per-page" modifier. */
|
|
63
|
-
ToolSettings.wheelPageFactor = 120;
|
|
64
|
-
/** When the zoom-with-wheel tool (with camera enabled) gets closer than this distance to an obstacle, it "bumps" through. */
|
|
65
|
-
ToolSettings.wheelZoomBumpDistance = core_geometry_1.Constant.oneCentimeter;
|
|
66
|
-
/** the speed to scroll for the "scroll view" tool (distance per second). */
|
|
67
|
-
ToolSettings.scrollSpeed = .75;
|
|
68
|
-
/** the speed to zoom for the "zoom view" tool. */
|
|
69
|
-
ToolSettings.zoomSpeed = 10;
|
|
70
|
-
/** Scale factor for zooming with mouse wheel. */
|
|
71
|
-
ToolSettings.wheelZoomRatio = 1.5;
|
|
72
|
-
/** Parameters for viewing operations with *inertia* (i.e. they continue briefly if used with a throwing action) */
|
|
73
|
-
ToolSettings.viewingInertia = {
|
|
74
|
-
/** Flag to enable inertia. */
|
|
75
|
-
enabled: true,
|
|
76
|
-
/** How quickly the inertia decays. The smaller the damping value the faster the inertia decays. Must be less than 1.0 */
|
|
77
|
-
damping: .96,
|
|
78
|
-
/** Maximum duration of the inertia operation. Important when frame rates are low. */
|
|
79
|
-
duration: core_bentley_1.BeDuration.fromMilliseconds(500),
|
|
80
|
-
};
|
|
81
|
-
/** Maximum number of times in a second the accuSnap tool's onMotion function is called. */
|
|
82
|
-
ToolSettings.maxOnMotionSnapCallPerSecond = 15;
|
|
83
83
|
//# 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,sDAAiD;AACjD,wDAAuD;AAEvD;;;GAGG;AACH,MAAa,YAAY
|
|
1
|
+
{"version":3,"file":"ToolSettings.js","sourceRoot":"","s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G,CAAC;IAClC,sEAAsE;aACxD,oBAAe,GAAG,EAAE,CAAC;IACnC,sEAAsE;aACxD,oBAAe,GAAG,GAAG,CAAC;IACpC,6HAA6H;aAC/G,0BAAqB,GAAG,wBAAQ,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,yBAAU,CAAC,gBAAgB,CAAC,GAAG,CAAC;KAC3C,CAAC;IACF,2FAA2F;aAC7E,iCAA4B,GAAG,EAAE,CAAC;;AA/DlD,oCAgEC","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"]}
|
|
@@ -2449,6 +2449,8 @@ class ViewFly extends ViewNavigate {
|
|
|
2449
2449
|
* @public
|
|
2450
2450
|
*/
|
|
2451
2451
|
class PanViewTool extends ViewManip {
|
|
2452
|
+
static { this.toolId = "View.Pan"; }
|
|
2453
|
+
static { this.iconSpec = "icon-hand-2"; }
|
|
2452
2454
|
constructor(vp, oneShot = false, isDraggingRequired = false) {
|
|
2453
2455
|
super(vp, ViewHandleType.Pan, oneShot, isDraggingRequired);
|
|
2454
2456
|
}
|
|
@@ -2458,12 +2460,12 @@ class PanViewTool extends ViewManip {
|
|
|
2458
2460
|
}
|
|
2459
2461
|
}
|
|
2460
2462
|
exports.PanViewTool = PanViewTool;
|
|
2461
|
-
PanViewTool.toolId = "View.Pan";
|
|
2462
|
-
PanViewTool.iconSpec = "icon-hand-2";
|
|
2463
2463
|
/** A tool that performs a Rotate view operation
|
|
2464
2464
|
* @public
|
|
2465
2465
|
*/
|
|
2466
2466
|
class RotateViewTool extends ViewManip {
|
|
2467
|
+
static { this.toolId = "View.Rotate"; }
|
|
2468
|
+
static { this.iconSpec = "icon-gyroscope"; }
|
|
2467
2469
|
constructor(vp, oneShot = false, isDraggingRequired = false) {
|
|
2468
2470
|
super(vp, ViewHandleType.Rotate | ViewHandleType.Pan | ViewHandleType.TargetCenter, oneShot, isDraggingRequired);
|
|
2469
2471
|
}
|
|
@@ -2473,12 +2475,12 @@ class RotateViewTool extends ViewManip {
|
|
|
2473
2475
|
}
|
|
2474
2476
|
}
|
|
2475
2477
|
exports.RotateViewTool = RotateViewTool;
|
|
2476
|
-
RotateViewTool.toolId = "View.Rotate";
|
|
2477
|
-
RotateViewTool.iconSpec = "icon-gyroscope";
|
|
2478
2478
|
/** A tool that performs the look operation
|
|
2479
2479
|
* @public
|
|
2480
2480
|
*/
|
|
2481
2481
|
class LookViewTool extends ViewManip {
|
|
2482
|
+
static { this.toolId = "View.Look"; }
|
|
2483
|
+
static { this.iconSpec = "icon-view-navigation"; }
|
|
2482
2484
|
constructor(vp, oneShot = false, isDraggingRequired = false) {
|
|
2483
2485
|
super(vp, ViewHandleType.Look | ViewHandleType.Pan, oneShot, isDraggingRequired);
|
|
2484
2486
|
}
|
|
@@ -2488,12 +2490,12 @@ class LookViewTool extends ViewManip {
|
|
|
2488
2490
|
}
|
|
2489
2491
|
}
|
|
2490
2492
|
exports.LookViewTool = LookViewTool;
|
|
2491
|
-
LookViewTool.toolId = "View.Look";
|
|
2492
|
-
LookViewTool.iconSpec = "icon-view-navigation";
|
|
2493
2493
|
/** A tool that performs the scroll operation
|
|
2494
2494
|
* @public
|
|
2495
2495
|
*/
|
|
2496
2496
|
class ScrollViewTool extends ViewManip {
|
|
2497
|
+
static { this.toolId = "View.Scroll"; }
|
|
2498
|
+
static { this.iconSpec = "icon-move"; }
|
|
2497
2499
|
constructor(vp, oneShot = false, isDraggingRequired = false) {
|
|
2498
2500
|
super(vp, ViewHandleType.Scroll, oneShot, isDraggingRequired);
|
|
2499
2501
|
}
|
|
@@ -2503,12 +2505,12 @@ class ScrollViewTool extends ViewManip {
|
|
|
2503
2505
|
}
|
|
2504
2506
|
}
|
|
2505
2507
|
exports.ScrollViewTool = ScrollViewTool;
|
|
2506
|
-
ScrollViewTool.toolId = "View.Scroll";
|
|
2507
|
-
ScrollViewTool.iconSpec = "icon-move";
|
|
2508
2508
|
/** A tool that performs the zoom operation
|
|
2509
2509
|
* @public
|
|
2510
2510
|
*/
|
|
2511
2511
|
class ZoomViewTool extends ViewManip {
|
|
2512
|
+
static { this.toolId = "View.Zoom"; }
|
|
2513
|
+
static { this.iconSpec = "icon-zoom"; }
|
|
2512
2514
|
constructor(vp, oneShot = false, isDraggingRequired = false) {
|
|
2513
2515
|
super(vp, ViewHandleType.Zoom | ViewHandleType.Pan, oneShot, isDraggingRequired);
|
|
2514
2516
|
}
|
|
@@ -2518,8 +2520,6 @@ class ZoomViewTool extends ViewManip {
|
|
|
2518
2520
|
}
|
|
2519
2521
|
}
|
|
2520
2522
|
exports.ZoomViewTool = ZoomViewTool;
|
|
2521
|
-
ZoomViewTool.toolId = "View.Zoom";
|
|
2522
|
-
ZoomViewTool.iconSpec = "icon-zoom";
|
|
2523
2523
|
/** A tool that performs the walk operation using mouse+keyboard or touch controls.
|
|
2524
2524
|
* Keyboard and mouse controls are similar to those used by many video games:
|
|
2525
2525
|
* - Mouse motion: look around.
|
|
@@ -2529,6 +2529,8 @@ ZoomViewTool.iconSpec = "icon-zoom";
|
|
|
2529
2529
|
* @public
|
|
2530
2530
|
*/
|
|
2531
2531
|
class LookAndMoveTool extends ViewManip {
|
|
2532
|
+
static { this.toolId = "View.LookAndMove"; }
|
|
2533
|
+
static { this.iconSpec = "icon-walk"; }
|
|
2532
2534
|
constructor(vp, oneShot = false, isDraggingRequired = false) {
|
|
2533
2535
|
const viewport = (undefined === vp ? IModelApp_1.IModelApp.viewManager.selectedView : vp); // Need vp to enable camera/check lens in onReinitialize...
|
|
2534
2536
|
super(viewport, ViewHandleType.LookAndMove | ViewHandleType.Pan, oneShot, isDraggingRequired);
|
|
@@ -2567,12 +2569,12 @@ class LookAndMoveTool extends ViewManip {
|
|
|
2567
2569
|
}
|
|
2568
2570
|
}
|
|
2569
2571
|
exports.LookAndMoveTool = LookAndMoveTool;
|
|
2570
|
-
LookAndMoveTool.toolId = "View.LookAndMove";
|
|
2571
|
-
LookAndMoveTool.iconSpec = "icon-walk";
|
|
2572
2572
|
/** A tool that performs the walk operation
|
|
2573
2573
|
* @public
|
|
2574
2574
|
*/
|
|
2575
2575
|
class WalkViewTool extends ViewManip {
|
|
2576
|
+
static { this.toolId = "View.Walk"; }
|
|
2577
|
+
static { this.iconSpec = "icon-walk"; }
|
|
2576
2578
|
constructor(vp, oneShot = false, isDraggingRequired = false) {
|
|
2577
2579
|
const viewport = (undefined === vp ? IModelApp_1.IModelApp.viewManager.selectedView : vp); // Need vp to enable camera/check lens in onReinitialize...
|
|
2578
2580
|
super(viewport, ViewHandleType.Walk | ViewHandleType.Pan, oneShot, isDraggingRequired);
|
|
@@ -2590,12 +2592,12 @@ class WalkViewTool extends ViewManip {
|
|
|
2590
2592
|
}
|
|
2591
2593
|
}
|
|
2592
2594
|
exports.WalkViewTool = WalkViewTool;
|
|
2593
|
-
WalkViewTool.toolId = "View.Walk";
|
|
2594
|
-
WalkViewTool.iconSpec = "icon-walk";
|
|
2595
2595
|
/** A tool that performs the fly operation
|
|
2596
2596
|
* @public
|
|
2597
2597
|
*/
|
|
2598
2598
|
class FlyViewTool extends ViewManip {
|
|
2599
|
+
static { this.toolId = "View.Fly"; }
|
|
2600
|
+
static { this.iconSpec = "icon-airplane"; }
|
|
2599
2601
|
constructor(vp, oneShot = false, isDraggingRequired = false) {
|
|
2600
2602
|
super(vp, ViewHandleType.Fly | ViewHandleType.Pan, oneShot, isDraggingRequired);
|
|
2601
2603
|
}
|
|
@@ -2612,12 +2614,12 @@ class FlyViewTool extends ViewManip {
|
|
|
2612
2614
|
}
|
|
2613
2615
|
}
|
|
2614
2616
|
exports.FlyViewTool = FlyViewTool;
|
|
2615
|
-
FlyViewTool.toolId = "View.Fly";
|
|
2616
|
-
FlyViewTool.iconSpec = "icon-airplane";
|
|
2617
2617
|
/** A tool that performs a fit view
|
|
2618
2618
|
* @public
|
|
2619
2619
|
*/
|
|
2620
2620
|
class FitViewTool extends ViewTool {
|
|
2621
|
+
static { this.toolId = "View.Fit"; }
|
|
2622
|
+
static { this.iconSpec = "icon-fit-to-view"; }
|
|
2621
2623
|
constructor(viewport, oneShot, doAnimate = true, isolatedOnly = true) {
|
|
2622
2624
|
super(viewport);
|
|
2623
2625
|
this.viewport = viewport;
|
|
@@ -2663,12 +2665,11 @@ class FitViewTool extends ViewTool {
|
|
|
2663
2665
|
}
|
|
2664
2666
|
}
|
|
2665
2667
|
exports.FitViewTool = FitViewTool;
|
|
2666
|
-
FitViewTool.toolId = "View.Fit";
|
|
2667
|
-
FitViewTool.iconSpec = "icon-fit-to-view";
|
|
2668
2668
|
/** 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.
|
|
2669
2669
|
* @public
|
|
2670
2670
|
*/
|
|
2671
2671
|
class ViewGlobeSatelliteTool extends ViewTool {
|
|
2672
|
+
static { this.toolId = "View.GlobeSatellite"; }
|
|
2672
2673
|
constructor(viewport, oneShot = true, doAnimate = true) {
|
|
2673
2674
|
super(viewport);
|
|
2674
2675
|
this.viewport = viewport;
|
|
@@ -2714,11 +2715,11 @@ class ViewGlobeSatelliteTool extends ViewTool {
|
|
|
2714
2715
|
}
|
|
2715
2716
|
}
|
|
2716
2717
|
exports.ViewGlobeSatelliteTool = ViewGlobeSatelliteTool;
|
|
2717
|
-
ViewGlobeSatelliteTool.toolId = "View.GlobeSatellite";
|
|
2718
2718
|
/** 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.
|
|
2719
2719
|
* @public
|
|
2720
2720
|
*/
|
|
2721
2721
|
class ViewGlobeBirdTool extends ViewTool {
|
|
2722
|
+
static { this.toolId = "View.GlobeBird"; }
|
|
2722
2723
|
constructor(viewport, oneShot = true, doAnimate = true) {
|
|
2723
2724
|
super(viewport);
|
|
2724
2725
|
this.viewport = viewport;
|
|
@@ -2761,13 +2762,13 @@ class ViewGlobeBirdTool extends ViewTool {
|
|
|
2761
2762
|
}
|
|
2762
2763
|
}
|
|
2763
2764
|
exports.ViewGlobeBirdTool = ViewGlobeBirdTool;
|
|
2764
|
-
ViewGlobeBirdTool.toolId = "View.GlobeBird";
|
|
2765
2765
|
/** A tool that views a location on the background map corresponding to a specified string.
|
|
2766
2766
|
* 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.
|
|
2767
2767
|
* Operates on the selected view.
|
|
2768
2768
|
* @public
|
|
2769
2769
|
*/
|
|
2770
2770
|
class ViewGlobeLocationTool extends ViewTool {
|
|
2771
|
+
static { this.toolId = "View.GlobeLocation"; }
|
|
2771
2772
|
constructor(viewport, oneShot = true, doAnimate = true) {
|
|
2772
2773
|
super(viewport);
|
|
2773
2774
|
this.viewport = viewport;
|
|
@@ -2828,11 +2829,11 @@ class ViewGlobeLocationTool extends ViewTool {
|
|
|
2828
2829
|
}
|
|
2829
2830
|
}
|
|
2830
2831
|
exports.ViewGlobeLocationTool = ViewGlobeLocationTool;
|
|
2831
|
-
ViewGlobeLocationTool.toolId = "View.GlobeLocation";
|
|
2832
2832
|
/** 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.
|
|
2833
2833
|
* @public
|
|
2834
2834
|
*/
|
|
2835
2835
|
class ViewGlobeIModelTool extends ViewTool {
|
|
2836
|
+
static { this.toolId = "View.GlobeIModel"; }
|
|
2836
2837
|
constructor(viewport, oneShot = true, doAnimate = true) {
|
|
2837
2838
|
super(viewport);
|
|
2838
2839
|
this.viewport = viewport;
|
|
@@ -2870,11 +2871,12 @@ class ViewGlobeIModelTool extends ViewTool {
|
|
|
2870
2871
|
}
|
|
2871
2872
|
}
|
|
2872
2873
|
exports.ViewGlobeIModelTool = ViewGlobeIModelTool;
|
|
2873
|
-
ViewGlobeIModelTool.toolId = "View.GlobeIModel";
|
|
2874
2874
|
/** A tool that rotates the view to one of the standard views.
|
|
2875
2875
|
* @public
|
|
2876
2876
|
*/
|
|
2877
2877
|
class StandardViewTool extends ViewTool {
|
|
2878
|
+
static { this.toolId = "View.Standard"; }
|
|
2879
|
+
static { this.iconSpec = "icon-cube-faces-top"; }
|
|
2878
2880
|
constructor(viewport, _standardViewId) {
|
|
2879
2881
|
super(viewport);
|
|
2880
2882
|
this._standardViewId = _standardViewId;
|
|
@@ -2899,8 +2901,6 @@ class StandardViewTool extends ViewTool {
|
|
|
2899
2901
|
}
|
|
2900
2902
|
}
|
|
2901
2903
|
exports.StandardViewTool = StandardViewTool;
|
|
2902
|
-
StandardViewTool.toolId = "View.Standard";
|
|
2903
|
-
StandardViewTool.iconSpec = "icon-cube-faces-top";
|
|
2904
2904
|
/** A tool that performs a Window-area view operation
|
|
2905
2905
|
* @public
|
|
2906
2906
|
*/
|
|
@@ -2914,6 +2914,8 @@ class WindowAreaTool extends ViewTool {
|
|
|
2914
2914
|
this._shapePts = [new core_geometry_1.Point3d(), new core_geometry_1.Point3d(), new core_geometry_1.Point3d(), new core_geometry_1.Point3d(), new core_geometry_1.Point3d()];
|
|
2915
2915
|
this._fillColor = core_common_1.ColorDef.from(0, 0, 255, 200);
|
|
2916
2916
|
}
|
|
2917
|
+
static { this.toolId = "View.WindowArea"; }
|
|
2918
|
+
static { this.iconSpec = "icon-window-area"; }
|
|
2917
2919
|
async onPostInstall() {
|
|
2918
2920
|
await super.onPostInstall();
|
|
2919
2921
|
this.provideToolAssistance();
|
|
@@ -3138,10 +3140,9 @@ class WindowAreaTool extends ViewTool {
|
|
|
3138
3140
|
}
|
|
3139
3141
|
}
|
|
3140
3142
|
exports.WindowAreaTool = WindowAreaTool;
|
|
3141
|
-
WindowAreaTool.toolId = "View.WindowArea";
|
|
3142
|
-
WindowAreaTool.iconSpec = "icon-window-area";
|
|
3143
3143
|
/** @internal */
|
|
3144
3144
|
class DefaultViewTouchTool extends ViewManip {
|
|
3145
|
+
static { this.toolId = ""; } // touch tools installed by IdleTool are never registered
|
|
3145
3146
|
/** Move this handle during the inertia duration */
|
|
3146
3147
|
animate() {
|
|
3147
3148
|
if (undefined === this._inertiaVec)
|
|
@@ -3358,11 +3359,12 @@ class DefaultViewTouchTool extends ViewManip {
|
|
|
3358
3359
|
}
|
|
3359
3360
|
}
|
|
3360
3361
|
exports.DefaultViewTouchTool = DefaultViewTouchTool;
|
|
3361
|
-
DefaultViewTouchTool.toolId = ""; // touch tools installed by IdleTool are never registered
|
|
3362
3362
|
/** A tool that performs view undo operation. An application could also just call Viewport.doUndo directly, creating a ViewTool isn't required.
|
|
3363
3363
|
* @public
|
|
3364
3364
|
*/
|
|
3365
3365
|
class ViewUndoTool extends ViewTool {
|
|
3366
|
+
static { this.toolId = "View.Undo"; }
|
|
3367
|
+
static { this.iconSpec = "icon-window-backward"; }
|
|
3366
3368
|
async onPostInstall() {
|
|
3367
3369
|
if (this.viewport)
|
|
3368
3370
|
this.viewport.doUndo(Viewport_1.ScreenViewport.animation.time.normal);
|
|
@@ -3370,12 +3372,12 @@ class ViewUndoTool extends ViewTool {
|
|
|
3370
3372
|
}
|
|
3371
3373
|
}
|
|
3372
3374
|
exports.ViewUndoTool = ViewUndoTool;
|
|
3373
|
-
ViewUndoTool.toolId = "View.Undo";
|
|
3374
|
-
ViewUndoTool.iconSpec = "icon-window-backward";
|
|
3375
3375
|
/** A tool that performs view redo operation. An application could also just call Viewport.doRedo directly, creating a ViewTool isn't required.
|
|
3376
3376
|
* @public
|
|
3377
3377
|
*/
|
|
3378
3378
|
class ViewRedoTool extends ViewTool {
|
|
3379
|
+
static { this.toolId = "View.Redo"; }
|
|
3380
|
+
static { this.iconSpec = "icon-window-forward"; }
|
|
3379
3381
|
async onPostInstall() {
|
|
3380
3382
|
if (this.viewport)
|
|
3381
3383
|
this.viewport.doRedo(Viewport_1.ScreenViewport.animation.time.normal);
|
|
@@ -3383,12 +3385,12 @@ class ViewRedoTool extends ViewTool {
|
|
|
3383
3385
|
}
|
|
3384
3386
|
}
|
|
3385
3387
|
exports.ViewRedoTool = ViewRedoTool;
|
|
3386
|
-
ViewRedoTool.toolId = "View.Redo";
|
|
3387
|
-
ViewRedoTool.iconSpec = "icon-window-forward";
|
|
3388
3388
|
/** A tool that toggles the camera on/off in a spatial view
|
|
3389
3389
|
* @public
|
|
3390
3390
|
*/
|
|
3391
3391
|
class ViewToggleCameraTool extends ViewTool {
|
|
3392
|
+
static { this.toolId = "View.ToggleCamera"; }
|
|
3393
|
+
static { this.iconSpec = "icon-camera"; }
|
|
3392
3394
|
async onInstall() { return (undefined !== this.viewport && this.viewport.view.allow3dManipulations()); }
|
|
3393
3395
|
async onPostInstall() {
|
|
3394
3396
|
if (this.viewport) {
|
|
@@ -3403,8 +3405,6 @@ class ViewToggleCameraTool extends ViewTool {
|
|
|
3403
3405
|
}
|
|
3404
3406
|
}
|
|
3405
3407
|
exports.ViewToggleCameraTool = ViewToggleCameraTool;
|
|
3406
|
-
ViewToggleCameraTool.toolId = "View.ToggleCamera";
|
|
3407
|
-
ViewToggleCameraTool.iconSpec = "icon-camera";
|
|
3408
3408
|
/** 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.
|
|
3409
3409
|
* 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
|
|
3410
3410
|
* by calling QuantityFormatter.onInitialized at app startup.
|
|
@@ -3417,6 +3417,8 @@ class SetupCameraTool extends PrimitiveTool_1.PrimitiveTool {
|
|
|
3417
3417
|
this._eyePtWorld = core_geometry_1.Point3d.create();
|
|
3418
3418
|
this._targetPtWorld = core_geometry_1.Point3d.create();
|
|
3419
3419
|
}
|
|
3420
|
+
static { this.toolId = "View.SetupCamera"; }
|
|
3421
|
+
static { this.iconSpec = "icon-camera-location"; }
|
|
3420
3422
|
isCompatibleViewport(vp, isSelectedViewChange) { return (super.isCompatibleViewport(vp, isSelectedViewChange) && undefined !== vp && vp.view.allow3dManipulations()); }
|
|
3421
3423
|
isValidLocation(_ev, _isButtonEvent) { return true; }
|
|
3422
3424
|
requireWriteableTarget() { return false; }
|
|
@@ -3664,8 +3666,6 @@ class SetupCameraTool extends PrimitiveTool_1.PrimitiveTool {
|
|
|
3664
3666
|
}
|
|
3665
3667
|
}
|
|
3666
3668
|
exports.SetupCameraTool = SetupCameraTool;
|
|
3667
|
-
SetupCameraTool.toolId = "View.SetupCamera";
|
|
3668
|
-
SetupCameraTool.iconSpec = "icon-camera-location";
|
|
3669
3669
|
/** 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.
|
|
3670
3670
|
* @public
|
|
3671
3671
|
*/
|
|
@@ -3676,6 +3676,8 @@ class SetupWalkCameraTool extends PrimitiveTool_1.PrimitiveTool {
|
|
|
3676
3676
|
this._eyePtWorld = core_geometry_1.Point3d.create();
|
|
3677
3677
|
this._targetPtWorld = core_geometry_1.Point3d.create();
|
|
3678
3678
|
}
|
|
3679
|
+
static { this.toolId = "View.SetupWalkCamera"; }
|
|
3680
|
+
static { this.iconSpec = "icon-camera-location"; }
|
|
3679
3681
|
isCompatibleViewport(vp, isSelectedViewChange) { return (super.isCompatibleViewport(vp, isSelectedViewChange) && undefined !== vp && vp.view.allow3dManipulations()); }
|
|
3680
3682
|
isValidLocation(_ev, _isButtonEvent) { return true; }
|
|
3681
3683
|
requireWriteableTarget() { return false; }
|
|
@@ -3845,6 +3847,4 @@ class SetupWalkCameraTool extends PrimitiveTool_1.PrimitiveTool {
|
|
|
3845
3847
|
}
|
|
3846
3848
|
}
|
|
3847
3849
|
exports.SetupWalkCameraTool = SetupWalkCameraTool;
|
|
3848
|
-
SetupWalkCameraTool.toolId = "View.SetupWalkCamera";
|
|
3849
|
-
SetupWalkCameraTool.iconSpec = "icon-camera-location";
|
|
3850
3850
|
//# sourceMappingURL=ViewTool.js.map
|