@itwin/core-frontend 3.3.0-dev.7 → 3.3.0-dev.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +69 -1
- package/lib/cjs/DisplayStyleState.d.ts +80 -31
- package/lib/cjs/DisplayStyleState.d.ts.map +1 -1
- package/lib/cjs/DisplayStyleState.js +150 -89
- package/lib/cjs/DisplayStyleState.js.map +1 -1
- package/lib/cjs/DrawingViewState.js +1 -1
- package/lib/cjs/DrawingViewState.js.map +1 -1
- package/lib/cjs/EntityState.d.ts +5 -5
- package/lib/cjs/EntityState.d.ts.map +1 -1
- package/lib/cjs/EntityState.js.map +1 -1
- package/lib/cjs/IModelApp.d.ts.map +1 -1
- package/lib/cjs/IModelApp.js +1 -1
- package/lib/cjs/IModelApp.js.map +1 -1
- package/lib/cjs/IModelConnection.d.ts +43 -3
- package/lib/cjs/IModelConnection.d.ts.map +1 -1
- package/lib/cjs/IModelConnection.js +29 -3
- package/lib/cjs/IModelConnection.js.map +1 -1
- package/lib/cjs/LocalhostIpcApp.d.ts.map +1 -1
- package/lib/cjs/LocalhostIpcApp.js +10 -0
- package/lib/cjs/LocalhostIpcApp.js.map +1 -1
- package/lib/cjs/RealityDataSource.d.ts.map +1 -1
- package/lib/cjs/RealityDataSource.js +6 -2
- package/lib/cjs/RealityDataSource.js.map +1 -1
- package/lib/cjs/SelectionSet.d.ts +30 -4
- package/lib/cjs/SelectionSet.d.ts.map +1 -1
- package/lib/cjs/SelectionSet.js +26 -2
- package/lib/cjs/SelectionSet.js.map +1 -1
- package/lib/cjs/SheetViewState.js +1 -1
- package/lib/cjs/SheetViewState.js.map +1 -1
- package/lib/cjs/SubCategoriesCache.d.ts +3 -0
- package/lib/cjs/SubCategoriesCache.d.ts.map +1 -1
- package/lib/cjs/SubCategoriesCache.js +34 -0
- package/lib/cjs/SubCategoriesCache.js.map +1 -1
- package/lib/cjs/TentativePoint.js +1 -1
- package/lib/cjs/TentativePoint.js.map +1 -1
- package/lib/cjs/ViewRect.d.ts +5 -3
- package/lib/cjs/ViewRect.d.ts.map +1 -1
- package/lib/cjs/ViewRect.js +11 -7
- package/lib/cjs/ViewRect.js.map +1 -1
- package/lib/cjs/ViewState.d.ts +1 -2
- package/lib/cjs/ViewState.d.ts.map +1 -1
- package/lib/cjs/ViewState.js +6 -2
- package/lib/cjs/ViewState.js.map +1 -1
- package/lib/cjs/Viewport.d.ts +1 -1
- package/lib/cjs/Viewport.d.ts.map +1 -1
- package/lib/cjs/Viewport.js +11 -6
- package/lib/cjs/Viewport.js.map +1 -1
- package/lib/cjs/core-frontend.d.ts +0 -2
- package/lib/cjs/core-frontend.d.ts.map +1 -1
- package/lib/cjs/core-frontend.js +0 -2
- package/lib/cjs/core-frontend.js.map +1 -1
- package/lib/cjs/extension/ExtensionAdmin.d.ts +5 -2
- package/lib/cjs/extension/ExtensionAdmin.d.ts.map +1 -1
- package/lib/cjs/extension/ExtensionAdmin.js +24 -6
- package/lib/cjs/extension/ExtensionAdmin.js.map +1 -1
- package/lib/cjs/extension/providers/RemoteExtensionProvider.d.ts +0 -2
- package/lib/cjs/extension/providers/RemoteExtensionProvider.d.ts.map +1 -1
- package/lib/cjs/extension/providers/RemoteExtensionProvider.js +9 -22
- package/lib/cjs/extension/providers/RemoteExtensionProvider.js.map +1 -1
- package/lib/cjs/render/FeatureSymbology.js +2 -2
- package/lib/cjs/render/FeatureSymbology.js.map +1 -1
- package/lib/cjs/render/GraphicBranch.d.ts +15 -9
- package/lib/cjs/render/GraphicBranch.d.ts.map +1 -1
- package/lib/cjs/render/GraphicBranch.js +38 -1
- package/lib/cjs/render/GraphicBranch.js.map +1 -1
- package/lib/cjs/render/RenderSystem.d.ts +5 -0
- package/lib/cjs/render/RenderSystem.d.ts.map +1 -1
- package/lib/cjs/render/RenderSystem.js.map +1 -1
- package/lib/cjs/render/primitives/EdgeParams.d.ts +11 -0
- package/lib/cjs/render/primitives/EdgeParams.d.ts.map +1 -1
- package/lib/cjs/render/primitives/EdgeParams.js +36 -29
- package/lib/cjs/render/primitives/EdgeParams.js.map +1 -1
- package/lib/cjs/render/primitives/VertexTable.d.ts +11 -4
- package/lib/cjs/render/primitives/VertexTable.d.ts.map +1 -1
- package/lib/cjs/render/primitives/VertexTable.js +13 -6
- package/lib/cjs/render/primitives/VertexTable.js.map +1 -1
- package/lib/cjs/render/primitives/VertexTableSplitter.d.ts +41 -0
- package/lib/cjs/render/primitives/VertexTableSplitter.d.ts.map +1 -0
- package/lib/cjs/render/primitives/VertexTableSplitter.js +662 -0
- package/lib/cjs/render/primitives/VertexTableSplitter.js.map +1 -0
- package/lib/cjs/render/primitives/geometry/GeometryListBuilder.d.ts.map +1 -1
- package/lib/cjs/render/primitives/geometry/GeometryListBuilder.js +3 -1
- package/lib/cjs/render/primitives/geometry/GeometryListBuilder.js.map +1 -1
- package/lib/cjs/render/webgl/DrawCommand.js +1 -1
- package/lib/cjs/render/webgl/DrawCommand.js.map +1 -1
- package/lib/cjs/render/webgl/FeatureOverrides.d.ts +4 -1
- package/lib/cjs/render/webgl/FeatureOverrides.d.ts.map +1 -1
- package/lib/cjs/render/webgl/FeatureOverrides.js +56 -26
- package/lib/cjs/render/webgl/FeatureOverrides.js.map +1 -1
- package/lib/cjs/render/webgl/ShaderProgram.js +1 -1
- package/lib/cjs/render/webgl/ShaderProgram.js.map +1 -1
- package/lib/cjs/render/webgl/Target.d.ts +3 -2
- package/lib/cjs/render/webgl/Target.d.ts.map +1 -1
- package/lib/cjs/render/webgl/Target.js +3 -2
- package/lib/cjs/render/webgl/Target.js.map +1 -1
- package/lib/cjs/render/webgl/UniformHandle.d.ts +2 -1
- package/lib/cjs/render/webgl/UniformHandle.d.ts.map +1 -1
- package/lib/cjs/render/webgl/UniformHandle.js +15 -3
- package/lib/cjs/render/webgl/UniformHandle.js.map +1 -1
- package/lib/cjs/render/webgl/glsl/RealityMesh.d.ts.map +1 -1
- package/lib/cjs/render/webgl/glsl/RealityMesh.js +5 -2
- package/lib/cjs/render/webgl/glsl/RealityMesh.js.map +1 -1
- package/lib/cjs/render-primitives.d.ts +1 -0
- package/lib/cjs/render-primitives.d.ts.map +1 -1
- package/lib/cjs/render-primitives.js +1 -0
- package/lib/cjs/render-primitives.js.map +1 -1
- package/lib/cjs/tile/ClassifierTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/ClassifierTileTree.js +8 -8
- package/lib/cjs/tile/ClassifierTileTree.js.map +1 -1
- package/lib/cjs/tile/IModelTile.d.ts.map +1 -1
- package/lib/cjs/tile/IModelTile.js +1 -0
- package/lib/cjs/tile/IModelTile.js.map +1 -1
- package/lib/cjs/tile/IModelTileTree.d.ts +3 -1
- package/lib/cjs/tile/IModelTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/IModelTileTree.js +1 -0
- package/lib/cjs/tile/IModelTileTree.js.map +1 -1
- package/lib/cjs/tile/ImdlReader.d.ts +9 -4
- package/lib/cjs/tile/ImdlReader.d.ts.map +1 -1
- package/lib/cjs/tile/ImdlReader.js +174 -60
- package/lib/cjs/tile/ImdlReader.js.map +1 -1
- package/lib/cjs/tile/PrimaryTileTree.d.ts +7 -6
- package/lib/cjs/tile/PrimaryTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/PrimaryTileTree.js +30 -25
- package/lib/cjs/tile/PrimaryTileTree.js.map +1 -1
- package/lib/cjs/tile/TileAdmin.d.ts +21 -2
- package/lib/cjs/tile/TileAdmin.d.ts.map +1 -1
- package/lib/cjs/tile/TileAdmin.js +32 -12
- package/lib/cjs/tile/TileAdmin.js.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +46 -2
- package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/MapCartoRectangle.d.ts +1 -0
- package/lib/cjs/tile/map/MapCartoRectangle.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapCartoRectangle.js +1 -0
- package/lib/cjs/tile/map/MapCartoRectangle.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerFormatRegistry.d.ts +2 -1
- package/lib/cjs/tile/map/MapLayerFormatRegistry.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerFormatRegistry.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts +2 -0
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.js +23 -9
- package/lib/cjs/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerSources.d.ts +14 -9
- package/lib/cjs/tile/map/MapLayerSources.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerSources.js +14 -6
- package/lib/cjs/tile/map/MapLayerSources.js.map +1 -1
- package/lib/cjs/tools/ClipViewTool.d.ts.map +1 -1
- package/lib/cjs/tools/ClipViewTool.js +25 -2
- package/lib/cjs/tools/ClipViewTool.js.map +1 -1
- package/lib/cjs/tools/PrimitiveTool.js +4 -4
- package/lib/cjs/tools/PrimitiveTool.js.map +1 -1
- package/lib/cjs/tools/ToolAdmin.d.ts.map +1 -1
- package/lib/cjs/tools/ToolAdmin.js +25 -10
- package/lib/cjs/tools/ToolAdmin.js.map +1 -1
- package/lib/esm/DisplayStyleState.d.ts +80 -31
- package/lib/esm/DisplayStyleState.d.ts.map +1 -1
- package/lib/esm/DisplayStyleState.js +150 -89
- package/lib/esm/DisplayStyleState.js.map +1 -1
- package/lib/esm/DrawingViewState.js +1 -1
- package/lib/esm/DrawingViewState.js.map +1 -1
- package/lib/esm/EntityState.d.ts +5 -5
- package/lib/esm/EntityState.d.ts.map +1 -1
- package/lib/esm/EntityState.js.map +1 -1
- package/lib/esm/IModelApp.d.ts.map +1 -1
- package/lib/esm/IModelApp.js +2 -2
- package/lib/esm/IModelApp.js.map +1 -1
- package/lib/esm/IModelConnection.d.ts +43 -3
- package/lib/esm/IModelConnection.d.ts.map +1 -1
- package/lib/esm/IModelConnection.js +29 -3
- package/lib/esm/IModelConnection.js.map +1 -1
- package/lib/esm/LocalhostIpcApp.d.ts.map +1 -1
- package/lib/esm/LocalhostIpcApp.js +11 -1
- package/lib/esm/LocalhostIpcApp.js.map +1 -1
- package/lib/esm/RealityDataSource.d.ts.map +1 -1
- package/lib/esm/RealityDataSource.js +6 -2
- package/lib/esm/RealityDataSource.js.map +1 -1
- package/lib/esm/SelectionSet.d.ts +30 -4
- package/lib/esm/SelectionSet.d.ts.map +1 -1
- package/lib/esm/SelectionSet.js +26 -2
- package/lib/esm/SelectionSet.js.map +1 -1
- package/lib/esm/SheetViewState.js +1 -1
- package/lib/esm/SheetViewState.js.map +1 -1
- package/lib/esm/SubCategoriesCache.d.ts +3 -0
- package/lib/esm/SubCategoriesCache.d.ts.map +1 -1
- package/lib/esm/SubCategoriesCache.js +34 -0
- package/lib/esm/SubCategoriesCache.js.map +1 -1
- package/lib/esm/TentativePoint.js +1 -1
- package/lib/esm/TentativePoint.js.map +1 -1
- package/lib/esm/ViewRect.d.ts +5 -3
- package/lib/esm/ViewRect.d.ts.map +1 -1
- package/lib/esm/ViewRect.js +11 -7
- package/lib/esm/ViewRect.js.map +1 -1
- package/lib/esm/ViewState.d.ts +1 -2
- package/lib/esm/ViewState.d.ts.map +1 -1
- package/lib/esm/ViewState.js +6 -2
- package/lib/esm/ViewState.js.map +1 -1
- package/lib/esm/Viewport.d.ts +1 -1
- package/lib/esm/Viewport.d.ts.map +1 -1
- package/lib/esm/Viewport.js +11 -6
- package/lib/esm/Viewport.js.map +1 -1
- package/lib/esm/core-frontend.d.ts +0 -2
- package/lib/esm/core-frontend.d.ts.map +1 -1
- package/lib/esm/core-frontend.js +0 -2
- package/lib/esm/core-frontend.js.map +1 -1
- package/lib/esm/extension/ExtensionAdmin.d.ts +5 -2
- package/lib/esm/extension/ExtensionAdmin.d.ts.map +1 -1
- package/lib/esm/extension/ExtensionAdmin.js +24 -6
- package/lib/esm/extension/ExtensionAdmin.js.map +1 -1
- package/lib/esm/extension/providers/RemoteExtensionProvider.d.ts +0 -2
- package/lib/esm/extension/providers/RemoteExtensionProvider.d.ts.map +1 -1
- package/lib/esm/extension/providers/RemoteExtensionProvider.js +9 -22
- package/lib/esm/extension/providers/RemoteExtensionProvider.js.map +1 -1
- package/lib/esm/render/FeatureSymbology.js +2 -2
- package/lib/esm/render/FeatureSymbology.js.map +1 -1
- package/lib/esm/render/GraphicBranch.d.ts +15 -9
- package/lib/esm/render/GraphicBranch.d.ts.map +1 -1
- package/lib/esm/render/GraphicBranch.js +36 -0
- package/lib/esm/render/GraphicBranch.js.map +1 -1
- package/lib/esm/render/RenderSystem.d.ts +5 -0
- package/lib/esm/render/RenderSystem.d.ts.map +1 -1
- package/lib/esm/render/RenderSystem.js.map +1 -1
- package/lib/esm/render/primitives/EdgeParams.d.ts +11 -0
- package/lib/esm/render/primitives/EdgeParams.d.ts.map +1 -1
- package/lib/esm/render/primitives/EdgeParams.js +34 -28
- package/lib/esm/render/primitives/EdgeParams.js.map +1 -1
- package/lib/esm/render/primitives/VertexTable.d.ts +11 -4
- package/lib/esm/render/primitives/VertexTable.d.ts.map +1 -1
- package/lib/esm/render/primitives/VertexTable.js +14 -7
- package/lib/esm/render/primitives/VertexTable.js.map +1 -1
- package/lib/esm/render/primitives/VertexTableSplitter.d.ts +41 -0
- package/lib/esm/render/primitives/VertexTableSplitter.d.ts.map +1 -0
- package/lib/esm/render/primitives/VertexTableSplitter.js +655 -0
- package/lib/esm/render/primitives/VertexTableSplitter.js.map +1 -0
- package/lib/esm/render/primitives/geometry/GeometryListBuilder.d.ts.map +1 -1
- package/lib/esm/render/primitives/geometry/GeometryListBuilder.js +3 -1
- package/lib/esm/render/primitives/geometry/GeometryListBuilder.js.map +1 -1
- package/lib/esm/render/webgl/DrawCommand.js +1 -1
- package/lib/esm/render/webgl/DrawCommand.js.map +1 -1
- package/lib/esm/render/webgl/FeatureOverrides.d.ts +4 -1
- package/lib/esm/render/webgl/FeatureOverrides.d.ts.map +1 -1
- package/lib/esm/render/webgl/FeatureOverrides.js +56 -26
- package/lib/esm/render/webgl/FeatureOverrides.js.map +1 -1
- package/lib/esm/render/webgl/ShaderProgram.js +1 -1
- package/lib/esm/render/webgl/ShaderProgram.js.map +1 -1
- package/lib/esm/render/webgl/Target.d.ts +3 -2
- package/lib/esm/render/webgl/Target.d.ts.map +1 -1
- package/lib/esm/render/webgl/Target.js +3 -2
- package/lib/esm/render/webgl/Target.js.map +1 -1
- package/lib/esm/render/webgl/UniformHandle.d.ts +2 -1
- package/lib/esm/render/webgl/UniformHandle.d.ts.map +1 -1
- package/lib/esm/render/webgl/UniformHandle.js +15 -3
- package/lib/esm/render/webgl/UniformHandle.js.map +1 -1
- package/lib/esm/render/webgl/glsl/RealityMesh.d.ts.map +1 -1
- package/lib/esm/render/webgl/glsl/RealityMesh.js +5 -2
- package/lib/esm/render/webgl/glsl/RealityMesh.js.map +1 -1
- package/lib/esm/render-primitives.d.ts +1 -0
- package/lib/esm/render-primitives.d.ts.map +1 -1
- package/lib/esm/render-primitives.js +1 -0
- package/lib/esm/render-primitives.js.map +1 -1
- package/lib/esm/tile/ClassifierTileTree.d.ts.map +1 -1
- package/lib/esm/tile/ClassifierTileTree.js +10 -10
- package/lib/esm/tile/ClassifierTileTree.js.map +1 -1
- package/lib/esm/tile/IModelTile.d.ts.map +1 -1
- package/lib/esm/tile/IModelTile.js +1 -0
- package/lib/esm/tile/IModelTile.js.map +1 -1
- package/lib/esm/tile/IModelTileTree.d.ts +3 -1
- package/lib/esm/tile/IModelTileTree.d.ts.map +1 -1
- package/lib/esm/tile/IModelTileTree.js +1 -0
- package/lib/esm/tile/IModelTileTree.js.map +1 -1
- package/lib/esm/tile/ImdlReader.d.ts +9 -4
- package/lib/esm/tile/ImdlReader.d.ts.map +1 -1
- package/lib/esm/tile/ImdlReader.js +174 -60
- package/lib/esm/tile/ImdlReader.js.map +1 -1
- package/lib/esm/tile/PrimaryTileTree.d.ts +7 -6
- package/lib/esm/tile/PrimaryTileTree.d.ts.map +1 -1
- package/lib/esm/tile/PrimaryTileTree.js +31 -26
- package/lib/esm/tile/PrimaryTileTree.js.map +1 -1
- package/lib/esm/tile/TileAdmin.d.ts +21 -2
- package/lib/esm/tile/TileAdmin.d.ts.map +1 -1
- package/lib/esm/tile/TileAdmin.js +33 -13
- package/lib/esm/tile/TileAdmin.js.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +46 -2
- package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/MapCartoRectangle.d.ts +1 -0
- package/lib/esm/tile/map/MapCartoRectangle.d.ts.map +1 -1
- package/lib/esm/tile/map/MapCartoRectangle.js +1 -0
- package/lib/esm/tile/map/MapCartoRectangle.js.map +1 -1
- package/lib/esm/tile/map/MapLayerFormatRegistry.d.ts +2 -1
- package/lib/esm/tile/map/MapLayerFormatRegistry.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerFormatRegistry.js.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts +2 -0
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.js +24 -10
- package/lib/esm/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/MapLayerSources.d.ts +14 -9
- package/lib/esm/tile/map/MapLayerSources.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerSources.js +14 -6
- package/lib/esm/tile/map/MapLayerSources.js.map +1 -1
- package/lib/esm/tools/ClipViewTool.d.ts.map +1 -1
- package/lib/esm/tools/ClipViewTool.js +25 -2
- package/lib/esm/tools/ClipViewTool.js.map +1 -1
- package/lib/esm/tools/PrimitiveTool.js +4 -4
- package/lib/esm/tools/PrimitiveTool.js.map +1 -1
- package/lib/esm/tools/ToolAdmin.d.ts.map +1 -1
- package/lib/esm/tools/ToolAdmin.js +25 -10
- package/lib/esm/tools/ToolAdmin.js.map +1 -1
- package/package.json +25 -25
- package/lib/cjs/RenderScheduleState.d.ts +0 -24
- package/lib/cjs/RenderScheduleState.d.ts.map +0 -1
- package/lib/cjs/RenderScheduleState.js +0 -76
- package/lib/cjs/RenderScheduleState.js.map +0 -1
- package/lib/cjs/extension/providers/ExtensionServiceClient.d.ts +0 -52
- package/lib/cjs/extension/providers/ExtensionServiceClient.d.ts.map +0 -1
- package/lib/cjs/extension/providers/ExtensionServiceClient.js +0 -131
- package/lib/cjs/extension/providers/ExtensionServiceClient.js.map +0 -1
- package/lib/cjs/extension/providers/ServiceExtensionProvider.d.ts +0 -37
- package/lib/cjs/extension/providers/ServiceExtensionProvider.d.ts.map +0 -1
- package/lib/cjs/extension/providers/ServiceExtensionProvider.js +0 -84
- package/lib/cjs/extension/providers/ServiceExtensionProvider.js.map +0 -1
- package/lib/esm/RenderScheduleState.d.ts +0 -24
- package/lib/esm/RenderScheduleState.d.ts.map +0 -1
- package/lib/esm/RenderScheduleState.js +0 -71
- package/lib/esm/RenderScheduleState.js.map +0 -1
- package/lib/esm/extension/providers/ExtensionServiceClient.d.ts +0 -52
- package/lib/esm/extension/providers/ExtensionServiceClient.d.ts.map +0 -1
- package/lib/esm/extension/providers/ExtensionServiceClient.js +0 -127
- package/lib/esm/extension/providers/ExtensionServiceClient.js.map +0 -1
- package/lib/esm/extension/providers/ServiceExtensionProvider.d.ts +0 -37
- package/lib/esm/extension/providers/ServiceExtensionProvider.d.ts.map +0 -1
- package/lib/esm/extension/providers/ServiceExtensionProvider.js +0 -80
- package/lib/esm/extension/providers/ServiceExtensionProvider.js.map +0 -1
|
@@ -50,6 +50,9 @@ export declare class SubCategoriesCache {
|
|
|
50
50
|
private static createSubCategoryAppearance;
|
|
51
51
|
private processResults;
|
|
52
52
|
private add;
|
|
53
|
+
getCategoryInfo(inputCategoryIds: Id64String | Iterable<Id64String>): Promise<Map<Id64String, IModelConnection.Categories.CategoryInfo>>;
|
|
54
|
+
getSubCategoryInfo(categoryId: Id64String, inputSubCategoryIds: Id64String | Iterable<Id64String>): Promise<Map<Id64String, IModelConnection.Categories.SubCategoryInfo>>;
|
|
55
|
+
private mapSubCategoryInfos;
|
|
53
56
|
}
|
|
54
57
|
/** This namespace and the types within it are exported strictly for use in tests.
|
|
55
58
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubCategoriesCache.d.ts","sourceRoot":"","sources":["../../src/SubCategoriesCache.ts"],"names":[],"mappings":"AAKA,OAAO,EAAmC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACpG,OAAO,EAAE,4BAA4B,EAAE,6BAA6B,EAAkB,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC9J,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,8EAA8E;IAC9E,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACrC;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IACnC,2BAA2B;IAC3B,MAAM,IAAI,IAAI,CAAC;CAChB;AAID;;GAEG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA8B;IAC5D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA4C;IACzE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmB;IAC3C,OAAO,CAAC,uBAAuB,CAAsB;gBAElC,MAAM,EAAE,gBAAgB;IAE3C,wIAAwI;IACjI,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IAEhE,wHAAwH;IACjH,wB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GAAG,MAAM,IAAI,CAAC;IAEnC,MAAa,UAAU;QACrB,SAAgB,WAAW,EAAE,OAAO,CAAC;QACrC,SAAgB,KAAK,EAAE,SAAS,EAAE,CAAC;oBAEhB,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS;KAIzD;IAED;;;;;OAKG;IACH,MAAa,KAAK;QAEhB,SAAS,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;QAChC,SAAS,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;QAC7B,SAAS,CAAC,QAAQ,CAAC,EAAE,oBAAoB,CAAC;QAC1C,SAAS,CAAC,SAAS,UAAS;QAE5B;;WAEG;QACI,IAAI,CAAC,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI;QASnF,+CAA+C;QACxC,OAAO,IAAI,IAAI;QAWtB,IAAW,OAAO,IAAI,OAAO,CAE5B;QAED,OAAO,CAAC,WAAW;QAgBnB,OAAO,CAAC,cAAc;QAoCtB,OAAO,CAAC,QAAQ;KAgBjB;CACF"}
|
|
@@ -102,6 +102,40 @@ export class SubCategoriesCache {
|
|
|
102
102
|
set.add(subCategoryId);
|
|
103
103
|
this._appearances.set(subCategoryId, appearance);
|
|
104
104
|
}
|
|
105
|
+
async getCategoryInfo(inputCategoryIds) {
|
|
106
|
+
// Eliminate duplicates...
|
|
107
|
+
const categoryIds = new Set(typeof inputCategoryIds === "string" ? [inputCategoryIds] : inputCategoryIds);
|
|
108
|
+
const req = this.load(categoryIds);
|
|
109
|
+
if (req)
|
|
110
|
+
await req.promise;
|
|
111
|
+
const map = new Map();
|
|
112
|
+
for (const categoryId of categoryIds) {
|
|
113
|
+
const subCategoryIds = this._byCategoryId.get(categoryId);
|
|
114
|
+
if (!subCategoryIds)
|
|
115
|
+
continue;
|
|
116
|
+
const subCategories = this.mapSubCategoryInfos(categoryId, subCategoryIds);
|
|
117
|
+
map.set(categoryId, { id: categoryId, subCategories });
|
|
118
|
+
}
|
|
119
|
+
return map;
|
|
120
|
+
}
|
|
121
|
+
async getSubCategoryInfo(categoryId, inputSubCategoryIds) {
|
|
122
|
+
// Eliminate duplicates...
|
|
123
|
+
const subCategoryIds = new Set(typeof inputSubCategoryIds === "string" ? [inputSubCategoryIds] : inputSubCategoryIds);
|
|
124
|
+
const req = this.load(categoryId);
|
|
125
|
+
if (req)
|
|
126
|
+
await req.promise;
|
|
127
|
+
return this.mapSubCategoryInfos(categoryId, subCategoryIds);
|
|
128
|
+
}
|
|
129
|
+
mapSubCategoryInfos(categoryId, subCategoryIds) {
|
|
130
|
+
const map = new Map();
|
|
131
|
+
for (const id of subCategoryIds) {
|
|
132
|
+
const appearance = this._appearances.get(id);
|
|
133
|
+
assert(undefined !== appearance);
|
|
134
|
+
if (appearance)
|
|
135
|
+
map.set(id, { id, categoryId, appearance });
|
|
136
|
+
}
|
|
137
|
+
return map;
|
|
138
|
+
}
|
|
105
139
|
}
|
|
106
140
|
/** This namespace and the types within it are exported strictly for use in tests.
|
|
107
141
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubCategoriesCache.js","sourceRoot":"","sources":["../../src/SubCategoriesCache.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,IAAI,EAAgC,MAAM,qBAAqB,CAAC;AACpG,OAAO,EAA+D,cAAc,EAAE,qBAAqB,EAAwB,MAAM,oBAAoB,CAAC;AAkB9J,MAAM,sBAAsB,GAAG,IAAI,GAAG,EAAU,CAAC;AAEjD;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAM7B,YAAmB,MAAwB;QAL1B,kBAAa,GAAG,IAAI,GAAG,EAAmB,CAAC;QAC3C,iBAAY,GAAG,IAAI,GAAG,EAAiC,CAAC;QAI1B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAAC,CAAC;IAEvE,wIAAwI;IACjI,gBAAgB,CAAC,UA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------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport { assert, CompressedId64Set, Id64, Id64Arg, Id64Set, Id64String } from \"@itwin/core-bentley\";\r\nimport { HydrateViewStateRequestProps, HydrateViewStateResponseProps, QueryRowFormat, SubCategoryAppearance, SubCategoryResultRow } from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"./IModelConnection\";\r\n\r\n/** A cancelable paginated request for subcategory information.\r\n * @see SubCategoriesCache\r\n * @internal\r\n */\r\nexport interface SubCategoriesRequest {\r\n /** The Ids of any categories which were requested but were not yet loaded. */\r\n readonly missingCategoryIds: Id64Set;\r\n /** A promise which resolves to true when all of the requested categories have been loaded, or to false if not all categories were loaded.\r\n * Categories may fail to load if the request is explicitly canceled or if the IModelConnection is closed before all categories are loaded.\r\n */\r\n readonly promise: Promise<boolean>;\r\n /** Cancels the request. */\r\n cancel(): void;\r\n}\r\n\r\nconst invalidCategoryIdEntry = new Set<string>();\r\n\r\n/** A cache of information about the subcategories contained within an [[IModelConnection]]. It is populated on demand.\r\n * @internal\r\n */\r\nexport class SubCategoriesCache {\r\n private readonly _byCategoryId = new Map<string, Id64Set>();\r\n private readonly _appearances = new Map<string, SubCategoryAppearance>();\r\n private readonly _imodel: IModelConnection;\r\n private _missingAtTimeOfPreload: Id64Set | undefined;\r\n\r\n public constructor(imodel: IModelConnection) { this._imodel = imodel; }\r\n\r\n /** Get the Ids of all subcategories belonging to the category with the specified Id, or undefined if no such information is present. */\r\n public getSubCategories(categoryId: string): Id64Set | undefined { return this._byCategoryId.get(categoryId); }\r\n\r\n /** Get the base appearance of the subcategory with the specified Id, or undefined if no such information is present. */\r\n public getSubCategoryAppearance(subCategoryId: Id64String): SubCategoryAppearance | undefined { return this._appearances.get(subCategoryId.toString()); }\r\n\r\n /** Request that the subcategory information for all of the specified categories is loaded.\r\n * If all such information has already been loaded, returns undefined.\r\n * Otherwise, dispatches an asynchronous request to load those categories which are not already loaded and returns a cancellable request object\r\n * containing the corresponding promise and the set of categories still to be loaded.\r\n */\r\n public load(categoryIds: Id64Arg): SubCategoriesRequest | undefined {\r\n const missing = this.getMissing(categoryIds);\r\n if (undefined === missing)\r\n return undefined;\r\n\r\n const request = new SubCategoriesCache.Request(missing, this._imodel);\r\n const promise = request.dispatch().then((result?: SubCategoriesCache.Result) => {\r\n if (undefined !== result)\r\n this.processResults(result, missing);\r\n\r\n return !request.wasCanceled;\r\n });\r\n\r\n return {\r\n missingCategoryIds: missing,\r\n promise,\r\n cancel: () => request.cancel(),\r\n };\r\n }\r\n\r\n /**\r\n * Populates the notLoadedCategoryIds property of the HydrateViewStateRequestProps.\r\n * notLoadedCategoryIds is a subset of categoryIds, filtering out any ids which already have an entry in the cache.\r\n */\r\n public preload(options: HydrateViewStateRequestProps, categoryIds: Id64Arg): void {\r\n const missing = this.getMissing(categoryIds);\r\n\r\n if (undefined === missing)\r\n return;\r\n this._missingAtTimeOfPreload = missing;\r\n options.notLoadedCategoryIds = CompressedId64Set.sortAndCompress(missing);\r\n }\r\n\r\n /**\r\n * Populates the SubCategoriesCache using the categoryIdsResult of the HydrateViewStateResponseProps\r\n */\r\n public postload(options: HydrateViewStateResponseProps): void {\r\n if (options.categoryIdsResult === undefined)\r\n return;\r\n // missingAtTimeOfPreload shouldn't be undefined if options.categoryIdsResult is defined... but just to be safe we'll check\r\n const missing = this._missingAtTimeOfPreload === undefined ? new Set<string>() : this._missingAtTimeOfPreload;\r\n this.processResults(options.categoryIdsResult, missing);\r\n // clear missing\r\n this._missingAtTimeOfPreload = undefined;\r\n }\r\n\r\n /** Given categoryIds, return which of these are not cached. */\r\n private getMissing(categoryIds: Id64Arg): Id64Set | undefined {\r\n let missing: Id64Set | undefined;\r\n for (const catId of Id64.iterable(categoryIds)) {\r\n if (undefined === this._byCategoryId.get(catId)) {\r\n if (undefined === missing)\r\n missing = new Set<string>();\r\n\r\n missing.add(catId);\r\n }\r\n }\r\n return missing;\r\n }\r\n\r\n public clear(): void {\r\n this._byCategoryId.clear();\r\n this._appearances.clear();\r\n }\r\n\r\n public onIModelConnectionClose(): void {\r\n this.clear();\r\n }\r\n\r\n private static createSubCategoryAppearance(json?: any) {\r\n let props: SubCategoryAppearance.Props | undefined;\r\n if (\"string\" === typeof json && 0 < json.length)\r\n props = JSON.parse(json);\r\n\r\n return new SubCategoryAppearance(props);\r\n }\r\n\r\n private processResults(result: SubCategoriesCache.Result, missing: Id64Set): void {\r\n for (const row of result)\r\n this.add(row.parentId, row.id, SubCategoriesCache.createSubCategoryAppearance(row.appearance));\r\n\r\n // Ensure that any category Ids which returned no results (e.g., non-existent category, invalid Id, etc) are still recorded so they are not repeatedly re-requested\r\n for (const id of missing)\r\n if (undefined === this._byCategoryId.get(id))\r\n this._byCategoryId.set(id, invalidCategoryIdEntry);\r\n }\r\n\r\n private add(categoryId: string, subCategoryId: string, appearance: SubCategoryAppearance) {\r\n let set = this._byCategoryId.get(categoryId);\r\n if (undefined === set)\r\n this._byCategoryId.set(categoryId, set = new Set<string>());\r\n\r\n set.add(subCategoryId);\r\n this._appearances.set(subCategoryId, appearance);\r\n }\r\n}\r\n\r\n/** This namespace and the types within it are exported strictly for use in tests.\r\n * @internal\r\n */\r\nexport namespace SubCategoriesCache { // eslint-disable-line no-redeclare\r\n\r\n export type Result = SubCategoryResultRow[];\r\n\r\n export class Request {\r\n private readonly _imodel: IModelConnection;\r\n private readonly _ecsql: string[] = [];\r\n private readonly _result: Result = [];\r\n private _canceled = false;\r\n private _curECSqlIndex = 0;\r\n\r\n public get wasCanceled() { return this._canceled || this._imodel.isClosed; }\r\n\r\n public constructor(categoryIds: Set<string>, imodel: IModelConnection, maxCategoriesPerQuery = 200) {\r\n this._imodel = imodel;\r\n\r\n const catIds = [...categoryIds];\r\n while (catIds.length !== 0) {\r\n const end = (catIds.length > maxCategoriesPerQuery) ? maxCategoriesPerQuery : catIds.length;\r\n const where = catIds.splice(0, end).join(\",\");\r\n this._ecsql.push(`SELECT ECInstanceId as id, Parent.Id as parentId, Properties as appearance FROM BisCore.SubCategory WHERE Parent.Id IN (${where})`);\r\n }\r\n }\r\n\r\n public cancel() { this._canceled = true; }\r\n\r\n public async dispatch(): Promise<Result | undefined> {\r\n if (this.wasCanceled || this._curECSqlIndex >= this._ecsql.length) // handle case of empty category Id set...\r\n return undefined;\r\n\r\n try {\r\n const ecsql = this._ecsql[this._curECSqlIndex];\r\n for await (const row of this._imodel.query(ecsql, undefined, { rowFormat: QueryRowFormat.UseJsPropertyNames })) {\r\n this._result.push(row as SubCategoryResultRow);\r\n if (this.wasCanceled)\r\n return undefined;\r\n }\r\n } catch {\r\n // ###TODO: detect cases in which retry is warranted\r\n // Note that currently, if we succeed in obtaining some pages of results and fail to retrieve another page, we will end up processing the\r\n // incomplete results. Since we're not retrying, that's the best we can do.\r\n }\r\n\r\n // Finished with current ECSql query. Dispatch the next if one exists.\r\n if (++this._curECSqlIndex < this._ecsql.length) {\r\n if (this.wasCanceled)\r\n return undefined;\r\n else\r\n return this.dispatch();\r\n }\r\n\r\n // Even if we were canceled, we've retrieved all the rows. Might as well process them to prevent another request for some of the same rows from being enqueued.\r\n return this._result;\r\n }\r\n }\r\n\r\n export type QueueFunc = () => void;\r\n\r\n export class QueueEntry {\r\n public readonly categoryIds: Id64Set;\r\n public readonly funcs: QueueFunc[];\r\n\r\n public constructor(categoryIds: Id64Set, func: QueueFunc) {\r\n this.categoryIds = categoryIds;\r\n this.funcs = [func];\r\n }\r\n }\r\n\r\n /** A \"queue\" of SubCategoriesRequests, which consists of between 0 and 2 entries. Each entry specifies the set of category IDs to be loaded and a list of functions to be executed\r\n * when loading is completed. This is used to enforce ordering of operations upon subcategories despite the need to asynchronously load them. It incidentally also provides an\r\n * opportunity to reduce the number of backend requests by batching consecutive requests.\r\n * Chiefly used by [[Viewport]].\r\n * @internal\r\n */\r\n export class Queue {\r\n /* NB: Members marked protected for use in tests only. */\r\n protected _current?: QueueEntry;\r\n protected _next?: QueueEntry;\r\n protected _request?: SubCategoriesRequest;\r\n protected _disposed = false;\r\n\r\n /** Push a request onto the queue. The requested categories will be loaded if necessary, and then\r\n * the supplied function will be invoked. Any previously-pushed requests are guaranteed to be processed before this one.\r\n */\r\n public push(cache: SubCategoriesCache, categoryIds: Id64Arg, func: QueueFunc): void {\r\n if (this._disposed)\r\n return;\r\n else if (undefined === this._current)\r\n this.pushCurrent(cache, categoryIds, func);\r\n else\r\n this.pushNext(categoryIds, func);\r\n }\r\n\r\n /** Cancel all requests and empty the queue. */\r\n public dispose(): void {\r\n if (undefined !== this._request) {\r\n assert(undefined !== this._current);\r\n this._request.cancel();\r\n this._request = undefined;\r\n }\r\n\r\n this._current = this._next = undefined;\r\n this._disposed = true;\r\n }\r\n\r\n public get isEmpty(): boolean {\r\n return undefined === this._current && undefined === this._next;\r\n }\r\n\r\n private pushCurrent(cache: SubCategoriesCache, categoryIds: Id64Arg, func: QueueFunc): void {\r\n assert(undefined === this._next);\r\n assert(undefined === this._current);\r\n assert(undefined === this._request);\r\n\r\n this._request = cache.load(categoryIds);\r\n if (undefined === this._request) {\r\n // All requested categories are already loaded.\r\n func();\r\n return;\r\n } else {\r\n // We need to load the requested categories before invoking the function.\r\n this.processCurrent(cache, new QueueEntry(Id64.toIdSet(categoryIds, true), func));\r\n }\r\n }\r\n\r\n private processCurrent(cache: SubCategoriesCache, entry: QueueEntry): void {\r\n assert(undefined !== this._request);\r\n assert(undefined === this._current);\r\n assert(undefined === this._next);\r\n\r\n this._current = entry;\r\n this._request.promise.then((completed: boolean) => { // eslint-disable-line @typescript-eslint/no-floating-promises\r\n if (this._disposed)\r\n return;\r\n\r\n // Invoke all the functions which were awaiting this set of categories.\r\n assert(undefined !== this._current);\r\n if (completed)\r\n for (const func of this._current.funcs)\r\n func();\r\n\r\n this._request = undefined;\r\n this._current = undefined;\r\n\r\n // If we have more requests, process them.\r\n const next = this._next;\r\n this._next = undefined;\r\n if (undefined !== next) {\r\n this._request = cache.load(next.categoryIds);\r\n if (undefined === this._request) {\r\n // All categories loaded.\r\n for (const func of next.funcs)\r\n func();\r\n } else {\r\n // We need to load the requested categories before invoking the pending functions.\r\n this.processCurrent(cache, next);\r\n }\r\n }\r\n });\r\n }\r\n\r\n private pushNext(categoryIds: Id64Arg, func: QueueFunc): void {\r\n assert(undefined !== this._current);\r\n assert(undefined !== this._request);\r\n\r\n if (undefined === this._next) {\r\n // We have a request currently in process and none pending.\r\n // We could potentially determine that this request doesn't require any categories that are not already loaded or being loaded by the current request.\r\n // But we will find that out (synchronously) when current request completes, unless more requests come in. Probably not worth it.\r\n this._next = new QueueEntry(Id64.toIdSet(categoryIds, true), func);\r\n } else {\r\n // We have a request currently in process, and one or more pending. Append this one to the pending.\r\n this._next.funcs.push(func);\r\n for (const categoryId of Id64.iterable(categoryIds))\r\n this._next.categoryIds.add(categoryId);\r\n }\r\n }\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"SubCategoriesCache.js","sourceRoot":"","sources":["../../src/SubCategoriesCache.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,IAAI,EAAgC,MAAM,qBAAqB,CAAC;AACpG,OAAO,EAA+D,cAAc,EAAE,qBAAqB,EAAwB,MAAM,oBAAoB,CAAC;AAkB9J,MAAM,sBAAsB,GAAG,IAAI,GAAG,EAAU,CAAC;AAEjD;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAM7B,YAAmB,MAAwB;QAL1B,kBAAa,GAAG,IAAI,GAAG,EAAmB,CAAC;QAC3C,iBAAY,GAAG,IAAI,GAAG,EAAiC,CAAC;QAI1B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAAC,CAAC;IAEvE,wIAAwI;IACjI,gBAAgB,CAAC,UAAkB,IAAyB,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAE/G,w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AK,MAAM,UAAU,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;oBACjD,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;aAC1C;QACH,CAAC;KACF;IAvGY,wBAAK,QAuGjB,CAAA;AACH,CAAC,EAjLgB,kBAAkB,KAAlB,kBAAkB,QAiLlC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport { assert, CompressedId64Set, Id64, Id64Arg, Id64Set, Id64String } from \"@itwin/core-bentley\";\r\nimport { HydrateViewStateRequestProps, HydrateViewStateResponseProps, QueryRowFormat, SubCategoryAppearance, SubCategoryResultRow } from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"./IModelConnection\";\r\n\r\n/** A cancelable paginated request for subcategory information.\r\n * @see SubCategoriesCache\r\n * @internal\r\n */\r\nexport interface SubCategoriesRequest {\r\n /** The Ids of any categories which were requested but were not yet loaded. */\r\n readonly missingCategoryIds: Id64Set;\r\n /** A promise which resolves to true when all of the requested categories have been loaded, or to false if not all categories were loaded.\r\n * Categories may fail to load if the request is explicitly canceled or if the IModelConnection is closed before all categories are loaded.\r\n */\r\n readonly promise: Promise<boolean>;\r\n /** Cancels the request. */\r\n cancel(): void;\r\n}\r\n\r\nconst invalidCategoryIdEntry = new Set<string>();\r\n\r\n/** A cache of information about the subcategories contained within an [[IModelConnection]]. It is populated on demand.\r\n * @internal\r\n */\r\nexport class SubCategoriesCache {\r\n private readonly _byCategoryId = new Map<string, Id64Set>();\r\n private readonly _appearances = new Map<string, SubCategoryAppearance>();\r\n private readonly _imodel: IModelConnection;\r\n private _missingAtTimeOfPreload: Id64Set | undefined;\r\n\r\n public constructor(imodel: IModelConnection) { this._imodel = imodel; }\r\n\r\n /** Get the Ids of all subcategories belonging to the category with the specified Id, or undefined if no such information is present. */\r\n public getSubCategories(categoryId: string): Id64Set | undefined { return this._byCategoryId.get(categoryId); }\r\n\r\n /** Get the base appearance of the subcategory with the specified Id, or undefined if no such information is present. */\r\n public getSubCategoryAppearance(subCategoryId: Id64String): SubCategoryAppearance | undefined { return this._appearances.get(subCategoryId.toString()); }\r\n\r\n /** Request that the subcategory information for all of the specified categories is loaded.\r\n * If all such information has already been loaded, returns undefined.\r\n * Otherwise, dispatches an asynchronous request to load those categories which are not already loaded and returns a cancellable request object\r\n * containing the corresponding promise and the set of categories still to be loaded.\r\n */\r\n public load(categoryIds: Id64Arg): SubCategoriesRequest | undefined {\r\n const missing = this.getMissing(categoryIds);\r\n if (undefined === missing)\r\n return undefined;\r\n\r\n const request = new SubCategoriesCache.Request(missing, this._imodel);\r\n const promise = request.dispatch().then((result?: SubCategoriesCache.Result) => {\r\n if (undefined !== result)\r\n this.processResults(result, missing);\r\n\r\n return !request.wasCanceled;\r\n });\r\n\r\n return {\r\n missingCategoryIds: missing,\r\n promise,\r\n cancel: () => request.cancel(),\r\n };\r\n }\r\n\r\n /**\r\n * Populates the notLoadedCategoryIds property of the HydrateViewStateRequestProps.\r\n * notLoadedCategoryIds is a subset of categoryIds, filtering out any ids which already have an entry in the cache.\r\n */\r\n public preload(options: HydrateViewStateRequestProps, categoryIds: Id64Arg): void {\r\n const missing = this.getMissing(categoryIds);\r\n\r\n if (undefined === missing)\r\n return;\r\n\r\n this._missingAtTimeOfPreload = missing;\r\n options.notLoadedCategoryIds = CompressedId64Set.sortAndCompress(missing);\r\n }\r\n\r\n /**\r\n * Populates the SubCategoriesCache using the categoryIdsResult of the HydrateViewStateResponseProps\r\n */\r\n public postload(options: HydrateViewStateResponseProps): void {\r\n if (options.categoryIdsResult === undefined)\r\n return;\r\n\r\n // missingAtTimeOfPreload shouldn't be undefined if options.categoryIdsResult is defined... but just to be safe we'll check\r\n const missing = this._missingAtTimeOfPreload === undefined ? new Set<string>() : this._missingAtTimeOfPreload;\r\n this.processResults(options.categoryIdsResult, missing);\r\n\r\n // clear missing\r\n this._missingAtTimeOfPreload = undefined;\r\n }\r\n\r\n /** Given categoryIds, return which of these are not cached. */\r\n private getMissing(categoryIds: Id64Arg): Id64Set | undefined {\r\n let missing: Id64Set | undefined;\r\n for (const catId of Id64.iterable(categoryIds)) {\r\n if (undefined === this._byCategoryId.get(catId)) {\r\n if (undefined === missing)\r\n missing = new Set<string>();\r\n\r\n missing.add(catId);\r\n }\r\n }\r\n\r\n return missing;\r\n }\r\n\r\n public clear(): void {\r\n this._byCategoryId.clear();\r\n this._appearances.clear();\r\n }\r\n\r\n public onIModelConnectionClose(): void {\r\n this.clear();\r\n }\r\n\r\n private static createSubCategoryAppearance(json?: any) {\r\n let props: SubCategoryAppearance.Props | undefined;\r\n if (\"string\" === typeof json && 0 < json.length)\r\n props = JSON.parse(json);\r\n\r\n return new SubCategoryAppearance(props);\r\n }\r\n\r\n private processResults(result: SubCategoriesCache.Result, missing: Id64Set): void {\r\n for (const row of result)\r\n this.add(row.parentId, row.id, SubCategoriesCache.createSubCategoryAppearance(row.appearance));\r\n\r\n // Ensure that any category Ids which returned no results (e.g., non-existent category, invalid Id, etc) are still recorded so they are not repeatedly re-requested\r\n for (const id of missing)\r\n if (undefined === this._byCategoryId.get(id))\r\n this._byCategoryId.set(id, invalidCategoryIdEntry);\r\n }\r\n\r\n private add(categoryId: string, subCategoryId: string, appearance: SubCategoryAppearance) {\r\n let set = this._byCategoryId.get(categoryId);\r\n if (undefined === set)\r\n this._byCategoryId.set(categoryId, set = new Set<string>());\r\n\r\n set.add(subCategoryId);\r\n this._appearances.set(subCategoryId, appearance);\r\n }\r\n\r\n public async getCategoryInfo(inputCategoryIds: Id64String | Iterable<Id64String>): Promise<Map<Id64String, IModelConnection.Categories.CategoryInfo>> {\r\n // Eliminate duplicates...\r\n const categoryIds = new Set<string>(typeof inputCategoryIds === \"string\" ? [inputCategoryIds] : inputCategoryIds);\r\n const req = this.load(categoryIds);\r\n if (req)\r\n await req.promise;\r\n\r\n const map = new Map<Id64String, IModelConnection.Categories.CategoryInfo>();\r\n for (const categoryId of categoryIds) {\r\n const subCategoryIds = this._byCategoryId.get(categoryId);\r\n if (!subCategoryIds)\r\n continue;\r\n\r\n const subCategories = this.mapSubCategoryInfos(categoryId, subCategoryIds);\r\n map.set(categoryId, { id: categoryId, subCategories });\r\n }\r\n\r\n return map;\r\n }\r\n\r\n public async getSubCategoryInfo(categoryId: Id64String, inputSubCategoryIds: Id64String | Iterable<Id64String>): Promise<Map<Id64String, IModelConnection.Categories.SubCategoryInfo>> {\r\n // Eliminate duplicates...\r\n const subCategoryIds = new Set<string>(typeof inputSubCategoryIds === \"string\" ? [inputSubCategoryIds] : inputSubCategoryIds);\r\n const req = this.load(categoryId);\r\n if (req)\r\n await req.promise;\r\n\r\n return this.mapSubCategoryInfos(categoryId, subCategoryIds);\r\n }\r\n\r\n private mapSubCategoryInfos(categoryId: Id64String, subCategoryIds: Set<Id64String>): Map<Id64String, IModelConnection.Categories.SubCategoryInfo> {\r\n const map = new Map<Id64String, IModelConnection.Categories.SubCategoryInfo>();\r\n for (const id of subCategoryIds) {\r\n const appearance = this._appearances.get(id);\r\n assert(undefined !== appearance);\r\n if (appearance)\r\n map.set(id, { id, categoryId, appearance });\r\n }\r\n\r\n return map;\r\n }\r\n}\r\n\r\n/** This namespace and the types within it are exported strictly for use in tests.\r\n * @internal\r\n */\r\nexport namespace SubCategoriesCache { // eslint-disable-line no-redeclare\r\n export type Result = SubCategoryResultRow[];\r\n\r\n export class Request {\r\n private readonly _imodel: IModelConnection;\r\n private readonly _ecsql: string[] = [];\r\n private readonly _result: Result = [];\r\n private _canceled = false;\r\n private _curECSqlIndex = 0;\r\n\r\n public get wasCanceled() { return this._canceled || this._imodel.isClosed; }\r\n\r\n public constructor(categoryIds: Set<string>, imodel: IModelConnection, maxCategoriesPerQuery = 200) {\r\n this._imodel = imodel;\r\n\r\n const catIds = [...categoryIds];\r\n while (catIds.length !== 0) {\r\n const end = (catIds.length > maxCategoriesPerQuery) ? maxCategoriesPerQuery : catIds.length;\r\n const where = catIds.splice(0, end).join(\",\");\r\n this._ecsql.push(`SELECT ECInstanceId as id, Parent.Id as parentId, Properties as appearance FROM BisCore.SubCategory WHERE Parent.Id IN (${where})`);\r\n }\r\n }\r\n\r\n public cancel() { this._canceled = true; }\r\n\r\n public async dispatch(): Promise<Result | undefined> {\r\n if (this.wasCanceled || this._curECSqlIndex >= this._ecsql.length) // handle case of empty category Id set...\r\n return undefined;\r\n\r\n try {\r\n const ecsql = this._ecsql[this._curECSqlIndex];\r\n for await (const row of this._imodel.query(ecsql, undefined, { rowFormat: QueryRowFormat.UseJsPropertyNames })) {\r\n this._result.push(row as SubCategoryResultRow);\r\n if (this.wasCanceled)\r\n return undefined;\r\n }\r\n } catch {\r\n // ###TODO: detect cases in which retry is warranted\r\n // Note that currently, if we succeed in obtaining some pages of results and fail to retrieve another page, we will end up processing the\r\n // incomplete results. Since we're not retrying, that's the best we can do.\r\n }\r\n\r\n // Finished with current ECSql query. Dispatch the next if one exists.\r\n if (++this._curECSqlIndex < this._ecsql.length) {\r\n if (this.wasCanceled)\r\n return undefined;\r\n else\r\n return this.dispatch();\r\n }\r\n\r\n // Even if we were canceled, we've retrieved all the rows. Might as well process them to prevent another request for some of the same rows from being enqueued.\r\n return this._result;\r\n }\r\n }\r\n\r\n export type QueueFunc = () => void;\r\n\r\n export class QueueEntry {\r\n public readonly categoryIds: Id64Set;\r\n public readonly funcs: QueueFunc[];\r\n\r\n public constructor(categoryIds: Id64Set, func: QueueFunc) {\r\n this.categoryIds = categoryIds;\r\n this.funcs = [func];\r\n }\r\n }\r\n\r\n /** A \"queue\" of SubCategoriesRequests, which consists of between 0 and 2 entries. Each entry specifies the set of category IDs to be loaded and a list of functions to be executed\r\n * when loading is completed. This is used to enforce ordering of operations upon subcategories despite the need to asynchronously load them. It incidentally also provides an\r\n * opportunity to reduce the number of backend requests by batching consecutive requests.\r\n * Chiefly used by [[Viewport]].\r\n * @internal\r\n */\r\n export class Queue {\r\n /* NB: Members marked protected for use in tests only. */\r\n protected _current?: QueueEntry;\r\n protected _next?: QueueEntry;\r\n protected _request?: SubCategoriesRequest;\r\n protected _disposed = false;\r\n\r\n /** Push a request onto the queue. The requested categories will be loaded if necessary, and then\r\n * the supplied function will be invoked. Any previously-pushed requests are guaranteed to be processed before this one.\r\n */\r\n public push(cache: SubCategoriesCache, categoryIds: Id64Arg, func: QueueFunc): void {\r\n if (this._disposed)\r\n return;\r\n else if (undefined === this._current)\r\n this.pushCurrent(cache, categoryIds, func);\r\n else\r\n this.pushNext(categoryIds, func);\r\n }\r\n\r\n /** Cancel all requests and empty the queue. */\r\n public dispose(): void {\r\n if (undefined !== this._request) {\r\n assert(undefined !== this._current);\r\n this._request.cancel();\r\n this._request = undefined;\r\n }\r\n\r\n this._current = this._next = undefined;\r\n this._disposed = true;\r\n }\r\n\r\n public get isEmpty(): boolean {\r\n return undefined === this._current && undefined === this._next;\r\n }\r\n\r\n private pushCurrent(cache: SubCategoriesCache, categoryIds: Id64Arg, func: QueueFunc): void {\r\n assert(undefined === this._next);\r\n assert(undefined === this._current);\r\n assert(undefined === this._request);\r\n\r\n this._request = cache.load(categoryIds);\r\n if (undefined === this._request) {\r\n // All requested categories are already loaded.\r\n func();\r\n return;\r\n } else {\r\n // We need to load the requested categories before invoking the function.\r\n this.processCurrent(cache, new QueueEntry(Id64.toIdSet(categoryIds, true), func));\r\n }\r\n }\r\n\r\n private processCurrent(cache: SubCategoriesCache, entry: QueueEntry): void {\r\n assert(undefined !== this._request);\r\n assert(undefined === this._current);\r\n assert(undefined === this._next);\r\n\r\n this._current = entry;\r\n this._request.promise.then((completed: boolean) => { // eslint-disable-line @typescript-eslint/no-floating-promises\r\n if (this._disposed)\r\n return;\r\n\r\n // Invoke all the functions which were awaiting this set of categories.\r\n assert(undefined !== this._current);\r\n if (completed)\r\n for (const func of this._current.funcs)\r\n func();\r\n\r\n this._request = undefined;\r\n this._current = undefined;\r\n\r\n // If we have more requests, process them.\r\n const next = this._next;\r\n this._next = undefined;\r\n if (undefined !== next) {\r\n this._request = cache.load(next.categoryIds);\r\n if (undefined === this._request) {\r\n // All categories loaded.\r\n for (const func of next.funcs)\r\n func();\r\n } else {\r\n // We need to load the requested categories before invoking the pending functions.\r\n this.processCurrent(cache, next);\r\n }\r\n }\r\n });\r\n }\r\n\r\n private pushNext(categoryIds: Id64Arg, func: QueueFunc): void {\r\n assert(undefined !== this._current);\r\n assert(undefined !== this._request);\r\n\r\n if (undefined === this._next) {\r\n // We have a request currently in process and none pending.\r\n // We could potentially determine that this request doesn't require any categories that are not already loaded or being loaded by the current request.\r\n // But we will find that out (synchronously) when current request completes, unless more requests come in. Probably not worth it.\r\n this._next = new QueueEntry(Id64.toIdSet(categoryIds, true), func);\r\n } else {\r\n // We have a request currently in process, and one or more pending. Append this one to the pending.\r\n this._next.funcs.push(func);\r\n for (const categoryId of Id64.iterable(categoryIds))\r\n this._next.categoryIds.add(categoryId);\r\n }\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -224,7 +224,7 @@ export class TentativePoint {
|
|
|
224
224
|
if (currTool && currTool instanceof ViewManip && currTool.viewHandles.hasHandle(ViewHandleType.TargetCenter))
|
|
225
225
|
currTool.updateTargetCenter(); // Change target center to tentative location...
|
|
226
226
|
else
|
|
227
|
-
IModelApp.toolAdmin.updateDynamics(); // Don't wait for motion to update
|
|
227
|
+
IModelApp.toolAdmin.updateDynamics(undefined, undefined, true); // Don't wait for motion to update dynamics...
|
|
228
228
|
}
|
|
229
229
|
});
|
|
230
230
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TentativePoint.js","sourceRoot":"","sources":["../../src/TentativePoint.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE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,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,CAAC,QAAS,CAAC,CAAC;iBAChE;gBAED,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;gBACjC,IAAI,QAAQ,IAAI,QAAQ,YAAY,SAAS,IAAI,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC,YAAY,CAAC;oBAC1G,QAAQ,CAAC,kBAAkB,EAAE,CAAC,CAAC,gDAAgD;;oBAE/E,SAAS,CAAC,SAAS,CAAC,cAAc,EAAE,CAAC,CAAC,mDAAmD;aAC5F;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module LocatingElements\r\n */\r\n\r\nimport { Point3d } from \"@itwin/core-geometry\";\r\nimport { AccuSnap } from \"./AccuSnap\";\r\nimport { HitListHolder } from \"./ElementLocateManager\";\r\nimport { HitDetail, HitList, HitPriority, HitSource, SnapDetail, SnapHeat, SnapMode } from \"./HitDetail\";\r\nimport { IModelApp } from \"./IModelApp\";\r\nimport { BeButton, BeButtonEvent } from \"./tools/Tool\";\r\nimport { ViewHandleType, ViewManip } from \"./tools/ViewTool\";\r\nimport { DecorateContext } from \"./ViewContext\";\r\nimport { ScreenViewport } from \"./Viewport\";\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport class TentativePoint {\r\n public isActive = false;\r\n public currSnap?: SnapDetail;\r\n public tpHits?: HitList<HitDetail>;\r\n private get _hotDistanceInches(): number { return 0.21; }\r\n private readonly _point: Point3d = new Point3d();\r\n private readonly _rawPoint: Point3d = new Point3d();\r\n private readonly _viewPoint: Point3d = new Point3d();\r\n private _tentativePromise?: Promise<SnapDetail | undefined>;\r\n public viewport?: ScreenViewport;\r\n\r\n public onInitialized() { }\r\n public setHitList(list?: HitList<HitDetail>) { this.tpHits = list; }\r\n\r\n /** @return true if the tentative point is currently active and snapped to an element. */\r\n public get isSnapped(): boolean { return undefined !== this.currSnap; }\r\n\r\n /** @return The current snap path when TentativePoint.isSnapped or undefined. */\r\n public getCurrSnap(): SnapDetail | undefined { return this.currSnap; }\r\n\r\n public getPoint(): Point3d {\r\n const snap = this.currSnap;\r\n return !snap ? this._point : snap.adjustedPoint;\r\n }\r\n\r\n public setPoint(point: Point3d): void {\r\n this.setCurrSnap(undefined);\r\n this.tpHits = undefined;\r\n this._point.setFrom(point);\r\n }\r\n\r\n public clear(doErase: boolean): void {\r\n if (doErase) {\r\n this.removeTentative();\r\n IModelApp.accuSnap.synchSnapMode();\r\n }\r\n IModelApp.accuSnap.destroy();\r\n this.isActive = false;\r\n this.setCurrSnap(undefined);\r\n this.tpHits = undefined;\r\n }\r\n\r\n public removeTentative(): void {\r\n this._tentativePromise = undefined;\r\n if (!this.isActive)\r\n return;\r\n IModelApp.accuSnap.erase();\r\n if (this.getCurrSnap())\r\n IModelApp.viewManager.invalidateDecorationsAllViews();\r\n else\r\n this.viewport!.invalidateDecorations();\r\n this.isActive = false;\r\n }\r\n\r\n public setCurrSnap(newSnap?: SnapDetail): void {\r\n if (newSnap)\r\n newSnap.setSnapPoint(newSnap.snapPoint, SnapHeat.InRange); // Reset adjustedPoint from pre-located snap and set SnapHeat...\r\n this.currSnap = newSnap;\r\n }\r\n\r\n public showTentative(): void {\r\n if (this.isSnapped) {\r\n IModelApp.viewManager.invalidateDecorationsAllViews();\r\n IModelApp.accuSnap.displayToolTip(this._viewPoint, this.viewport!, undefined); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n } else {\r\n this.viewport!.invalidateDecorations();\r\n }\r\n this.isActive = true;\r\n }\r\n\r\n public getHitAndList(holder: HitListHolder): SnapDetail | undefined {\r\n const hit = this.currSnap;\r\n if (hit) {\r\n holder.setHitList(this.tpHits);\r\n this.tpHits = undefined;\r\n }\r\n return hit;\r\n }\r\n\r\n public onButtonEvent(ev: BeButtonEvent): void {\r\n switch (ev.button) {\r\n case BeButton.Data:\r\n if (!ev.isDown)\r\n return; // cleared on down...\r\n break;\r\n case BeButton.Reset:\r\n if (ev.isDown)\r\n return; // cleared on up...\r\n break;\r\n case BeButton.Middle:\r\n return;\r\n }\r\n\r\n this.removeTentative();\r\n IModelApp.accuSnap.synchSnapMode();\r\n this.setCurrSnap(undefined);\r\n this.tpHits = undefined;\r\n }\r\n\r\n public decorate(context: DecorateContext): void {\r\n const viewport = context.viewport;\r\n if (!this.isActive || !viewport)\r\n return;\r\n\r\n const tpSize = Math.floor(viewport.pixelsPerInch * 0.4) + 0.5;\r\n const toSizeOutline = tpSize + 1;\r\n const position = context.viewport.worldToView(this._point); position.x = Math.floor(position.x) + 0.5; position.y = Math.floor(position.y) + 0.5;\r\n const drawDecoration = (ctx: CanvasRenderingContext2D) => {\r\n ctx.beginPath();\r\n ctx.strokeStyle = \"rgba(0,0,0,.5)\";\r\n ctx.lineWidth = 3;\r\n ctx.moveTo(-toSizeOutline, 0);\r\n ctx.lineTo(toSizeOutline, 0);\r\n ctx.moveTo(0, -toSizeOutline);\r\n ctx.lineTo(0, toSizeOutline);\r\n ctx.stroke();\r\n\r\n ctx.beginPath();\r\n ctx.strokeStyle = \"white\";\r\n ctx.lineWidth = 1;\r\n if (!this.isSnapped) ctx.setLineDash([4, 1]);\r\n ctx.shadowColor = \"black\";\r\n ctx.shadowBlur = 5;\r\n ctx.moveTo(-tpSize, 0);\r\n ctx.lineTo(tpSize, 0);\r\n ctx.moveTo(0, -tpSize);\r\n ctx.lineTo(0, tpSize);\r\n ctx.stroke();\r\n };\r\n context.addCanvasDecoration({ position, drawDecoration });\r\n }\r\n\r\n private async getSnap(newSearch: boolean): Promise<SnapDetail | undefined> {\r\n // Use next hit from previous search when using tentative to cycle through hits...\r\n let thisHit = (!newSearch && undefined !== this.tpHits ? this.tpHits.getNextHit() : undefined);\r\n\r\n // Use existing AccuSnap hit list if one exists...\r\n if (undefined === thisHit) {\r\n this.tpHits = undefined;\r\n thisHit = IModelApp.accuSnap.getHitAndList(this);\r\n }\r\n\r\n if (undefined === thisHit) {\r\n // search for elements around the current raw point (search should not be affected by locks!)\r\n const aperture = (2.0 * this.viewport!.pixelsFromInches(IModelApp.locateManager.apertureInches) / 2.0) + 1.5;\r\n const options = IModelApp.locateManager.options.clone(); // Copy to avoid changing out from under active Tool...\r\n const picker = IModelApp.locateManager.picker;\r\n\r\n options.hitSource = HitSource.TentativeSnap;\r\n if (0 === picker.doPick(this.viewport!, this._rawPoint, aperture, options))\r\n return undefined;\r\n\r\n this.tpHits = picker.getHitList(true);\r\n thisHit = (undefined !== this.tpHits ? this.tpHits.getNextHit() : undefined);\r\n } else if (thisHit instanceof SnapDetail) {\r\n // Make the current AccuSnap the TentativePoint snap...\r\n return thisHit;\r\n }\r\n\r\n if (undefined === thisHit)\r\n return undefined;\r\n\r\n const snapModes = IModelApp.accuSnap.getActiveSnapModes(); // Get the list of point snap modes to consider\r\n if (1 === snapModes.length && SnapMode.Intersection === snapModes[0])\r\n snapModes.push(SnapMode.Nearest); // Add nearest when doing intersection by itself to support finding extended intersections...\r\n\r\n const thisSnap = await AccuSnap.requestSnap(thisHit, snapModes, this._hotDistanceInches, IModelApp.accuSnap.keypointDivisor, this.tpHits);\r\n\r\n if (undefined !== thisSnap)\r\n IModelApp.accuDraw.onSnap(thisSnap); // AccuDraw can adjust nearest snap to intersection of circle (polar distance lock) or line (axis lock) with snapped to curve...\r\n\r\n return thisSnap;\r\n }\r\n\r\n private static arePointsCloseEnough(pt1: Point3d, pt2: Point3d, pixelDistance: number): boolean { return pt1.distance(pt2) < (pixelDistance + 1.5); }\r\n\r\n public process(ev: BeButtonEvent): void {\r\n if (undefined !== this._tentativePromise)\r\n return;\r\n\r\n const currTool = IModelApp.toolAdmin.viewTool;\r\n if (currTool && currTool.inDynamicUpdate)\r\n return; // trying to tentative snap while view is changing isn't useful...\r\n\r\n const wasActive = this.isActive;\r\n this.removeTentative(); // remove the TP cross if it is already on the screen\r\n const lastPtView = this._viewPoint.clone();\r\n\r\n this.viewport = ev.viewport!;\r\n this._point.setFrom(ev.point);\r\n this._rawPoint.setFrom(ev.rawPoint);\r\n this._viewPoint.setFrom(ev.viewPoint);\r\n\r\n const newSearch = (!this.isSnapped || !TentativePoint.arePointsCloseEnough(lastPtView, this._viewPoint, this.viewport.pixelsFromInches(IModelApp.locateManager.apertureInches)));\r\n const promise = this.getSnap(newSearch);\r\n this._tentativePromise = promise;\r\n\r\n promise.then((newSnap) => { // eslint-disable-line @typescript-eslint/no-floating-promises\r\n // Ignore response if we're no longer interested in this tentative.\r\n if (this._tentativePromise === promise) {\r\n this._tentativePromise = undefined;\r\n this.setCurrSnap(newSnap); // Adopt the snap as current\r\n IModelApp.accuSnap.clear(); // make sure there's no AccuSnap active after a tentative point (otherwise we continually snap to it).\r\n if (this.isSnapped)\r\n this._point.setFrom(this.currSnap!.snapPoint);\r\n else if (wasActive && newSearch)\r\n this._point.setFrom(ev.rawPoint);\r\n this.showTentative(); // show the TP cross\r\n\r\n if (this.isSnapped) {\r\n IModelApp.toolAdmin.adjustSnapPoint();\r\n } else if (IModelApp.accuDraw.isActive) {\r\n const point = this.getPoint().clone();\r\n const vp = ev.viewport!;\r\n if (vp.isSnapAdjustmentRequired) {\r\n IModelApp.toolAdmin.adjustPointToACS(point, vp, false);\r\n const hit = new HitDetail(point, vp, HitSource.TentativeSnap, point, \"\", HitPriority.Unknown, 0, 0);\r\n const snap = new SnapDetail(hit);\r\n this.setCurrSnap(snap);\r\n IModelApp.toolAdmin.adjustSnapPoint();\r\n this.setPoint(this.getPoint());\r\n } else {\r\n IModelApp.accuDraw.adjustPoint(point, vp, false);\r\n const savePoint = point.clone();\r\n IModelApp.toolAdmin.adjustPointToGrid(point, vp);\r\n if (!point.isExactEqual(savePoint))\r\n IModelApp.accuDraw.adjustPoint(point, vp, false);\r\n this.setPoint(point);\r\n }\r\n } else {\r\n IModelApp.toolAdmin.adjustPoint(this.getPoint(), ev.viewport!);\r\n }\r\n\r\n IModelApp.accuDraw.onTentative();\r\n if (currTool && currTool instanceof ViewManip && currTool.viewHandles.hasHandle(ViewHandleType.TargetCenter))\r\n currTool.updateTargetCenter(); // Change target center to tentative location...\r\n else\r\n IModelApp.toolAdmin.updateDynamics(); // Don't wait for motion to update tool dynamics...\r\n }\r\n });\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"TentativePoint.js","sourceRoot":"","sources":["../../src/TentativePoint.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,SAAS,EAAW,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACzG,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAiB,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAI7D;;;GAGG;AACH,MAAM,OAAO,cAAc;IAA3B;QACS,aAAQ,GAAG,KAAK,CAAC;QAIP,WAAM,GAAY,IAAI,OAAO,EAAE,CAAC;QAChC,cAAS,GAAY,IAAI,OAAO,EAAE,CAAC;QACnC,eAAU,GAAY,IAAI,OAAO,EAAE,CAAC;IA0OvD,CAAC;IA7OC,IAAY,kBAAkB,KAAa,OAAO,IAAI,CAAC,CAAC,CAAC;IAOlD,aAAa,KAAK,CAAC;IACnB,UAAU,CAAC,IAAyB,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;IAEpE,yFAAyF;IACzF,IAAW,SAAS,KAAc,OAAO,SAAS,KAAK,IAAI,CAAC,QAAQ,CAAC,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Q,EAAE,CAAC,CAAC;qBAChC;yBAAM;wBACL,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;wBACjD,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC;wBAChC,SAAS,CAAC,SAAS,CAAC,iBAAiB,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;wBACjD,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC;4BAChC,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;wBACnD,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;qBACtB;iBACF;qBAAM;oBACL,SAAS,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,CAAC,QAAS,CAAC,CAAC;iBAChE;gBAED,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;gBACjC,IAAI,QAAQ,IAAI,QAAQ,YAAY,SAAS,IAAI,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC,YAAY,CAAC;oBAC1G,QAAQ,CAAC,kBAAkB,EAAE,CAAC,CAAC,gDAAgD;;oBAE/E,SAAS,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,8CAA8C;aACjH;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module LocatingElements\r\n */\r\n\r\nimport { Point3d } from \"@itwin/core-geometry\";\r\nimport { AccuSnap } from \"./AccuSnap\";\r\nimport { HitListHolder } from \"./ElementLocateManager\";\r\nimport { HitDetail, HitList, HitPriority, HitSource, SnapDetail, SnapHeat, SnapMode } from \"./HitDetail\";\r\nimport { IModelApp } from \"./IModelApp\";\r\nimport { BeButton, BeButtonEvent } from \"./tools/Tool\";\r\nimport { ViewHandleType, ViewManip } from \"./tools/ViewTool\";\r\nimport { DecorateContext } from \"./ViewContext\";\r\nimport { ScreenViewport } from \"./Viewport\";\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport class TentativePoint {\r\n public isActive = false;\r\n public currSnap?: SnapDetail;\r\n public tpHits?: HitList<HitDetail>;\r\n private get _hotDistanceInches(): number { return 0.21; }\r\n private readonly _point: Point3d = new Point3d();\r\n private readonly _rawPoint: Point3d = new Point3d();\r\n private readonly _viewPoint: Point3d = new Point3d();\r\n private _tentativePromise?: Promise<SnapDetail | undefined>;\r\n public viewport?: ScreenViewport;\r\n\r\n public onInitialized() { }\r\n public setHitList(list?: HitList<HitDetail>) { this.tpHits = list; }\r\n\r\n /** @return true if the tentative point is currently active and snapped to an element. */\r\n public get isSnapped(): boolean { return undefined !== this.currSnap; }\r\n\r\n /** @return The current snap path when TentativePoint.isSnapped or undefined. */\r\n public getCurrSnap(): SnapDetail | undefined { return this.currSnap; }\r\n\r\n public getPoint(): Point3d {\r\n const snap = this.currSnap;\r\n return !snap ? this._point : snap.adjustedPoint;\r\n }\r\n\r\n public setPoint(point: Point3d): void {\r\n this.setCurrSnap(undefined);\r\n this.tpHits = undefined;\r\n this._point.setFrom(point);\r\n }\r\n\r\n public clear(doErase: boolean): void {\r\n if (doErase) {\r\n this.removeTentative();\r\n IModelApp.accuSnap.synchSnapMode();\r\n }\r\n IModelApp.accuSnap.destroy();\r\n this.isActive = false;\r\n this.setCurrSnap(undefined);\r\n this.tpHits = undefined;\r\n }\r\n\r\n public removeTentative(): void {\r\n this._tentativePromise = undefined;\r\n if (!this.isActive)\r\n return;\r\n IModelApp.accuSnap.erase();\r\n if (this.getCurrSnap())\r\n IModelApp.viewManager.invalidateDecorationsAllViews();\r\n else\r\n this.viewport!.invalidateDecorations();\r\n this.isActive = false;\r\n }\r\n\r\n public setCurrSnap(newSnap?: SnapDetail): void {\r\n if (newSnap)\r\n newSnap.setSnapPoint(newSnap.snapPoint, SnapHeat.InRange); // Reset adjustedPoint from pre-located snap and set SnapHeat...\r\n this.currSnap = newSnap;\r\n }\r\n\r\n public showTentative(): void {\r\n if (this.isSnapped) {\r\n IModelApp.viewManager.invalidateDecorationsAllViews();\r\n IModelApp.accuSnap.displayToolTip(this._viewPoint, this.viewport!, undefined); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n } else {\r\n this.viewport!.invalidateDecorations();\r\n }\r\n this.isActive = true;\r\n }\r\n\r\n public getHitAndList(holder: HitListHolder): SnapDetail | undefined {\r\n const hit = this.currSnap;\r\n if (hit) {\r\n holder.setHitList(this.tpHits);\r\n this.tpHits = undefined;\r\n }\r\n return hit;\r\n }\r\n\r\n public onButtonEvent(ev: BeButtonEvent): void {\r\n switch (ev.button) {\r\n case BeButton.Data:\r\n if (!ev.isDown)\r\n return; // cleared on down...\r\n break;\r\n case BeButton.Reset:\r\n if (ev.isDown)\r\n return; // cleared on up...\r\n break;\r\n case BeButton.Middle:\r\n return;\r\n }\r\n\r\n this.removeTentative();\r\n IModelApp.accuSnap.synchSnapMode();\r\n this.setCurrSnap(undefined);\r\n this.tpHits = undefined;\r\n }\r\n\r\n public decorate(context: DecorateContext): void {\r\n const viewport = context.viewport;\r\n if (!this.isActive || !viewport)\r\n return;\r\n\r\n const tpSize = Math.floor(viewport.pixelsPerInch * 0.4) + 0.5;\r\n const toSizeOutline = tpSize + 1;\r\n const position = context.viewport.worldToView(this._point); position.x = Math.floor(position.x) + 0.5; position.y = Math.floor(position.y) + 0.5;\r\n const drawDecoration = (ctx: CanvasRenderingContext2D) => {\r\n ctx.beginPath();\r\n ctx.strokeStyle = \"rgba(0,0,0,.5)\";\r\n ctx.lineWidth = 3;\r\n ctx.moveTo(-toSizeOutline, 0);\r\n ctx.lineTo(toSizeOutline, 0);\r\n ctx.moveTo(0, -toSizeOutline);\r\n ctx.lineTo(0, toSizeOutline);\r\n ctx.stroke();\r\n\r\n ctx.beginPath();\r\n ctx.strokeStyle = \"white\";\r\n ctx.lineWidth = 1;\r\n if (!this.isSnapped) ctx.setLineDash([4, 1]);\r\n ctx.shadowColor = \"black\";\r\n ctx.shadowBlur = 5;\r\n ctx.moveTo(-tpSize, 0);\r\n ctx.lineTo(tpSize, 0);\r\n ctx.moveTo(0, -tpSize);\r\n ctx.lineTo(0, tpSize);\r\n ctx.stroke();\r\n };\r\n context.addCanvasDecoration({ position, drawDecoration });\r\n }\r\n\r\n private async getSnap(newSearch: boolean): Promise<SnapDetail | undefined> {\r\n // Use next hit from previous search when using tentative to cycle through hits...\r\n let thisHit = (!newSearch && undefined !== this.tpHits ? this.tpHits.getNextHit() : undefined);\r\n\r\n // Use existing AccuSnap hit list if one exists...\r\n if (undefined === thisHit) {\r\n this.tpHits = undefined;\r\n thisHit = IModelApp.accuSnap.getHitAndList(this);\r\n }\r\n\r\n if (undefined === thisHit) {\r\n // search for elements around the current raw point (search should not be affected by locks!)\r\n const aperture = (2.0 * this.viewport!.pixelsFromInches(IModelApp.locateManager.apertureInches) / 2.0) + 1.5;\r\n const options = IModelApp.locateManager.options.clone(); // Copy to avoid changing out from under active Tool...\r\n const picker = IModelApp.locateManager.picker;\r\n\r\n options.hitSource = HitSource.TentativeSnap;\r\n if (0 === picker.doPick(this.viewport!, this._rawPoint, aperture, options))\r\n return undefined;\r\n\r\n this.tpHits = picker.getHitList(true);\r\n thisHit = (undefined !== this.tpHits ? this.tpHits.getNextHit() : undefined);\r\n } else if (thisHit instanceof SnapDetail) {\r\n // Make the current AccuSnap the TentativePoint snap...\r\n return thisHit;\r\n }\r\n\r\n if (undefined === thisHit)\r\n return undefined;\r\n\r\n const snapModes = IModelApp.accuSnap.getActiveSnapModes(); // Get the list of point snap modes to consider\r\n if (1 === snapModes.length && SnapMode.Intersection === snapModes[0])\r\n snapModes.push(SnapMode.Nearest); // Add nearest when doing intersection by itself to support finding extended intersections...\r\n\r\n const thisSnap = await AccuSnap.requestSnap(thisHit, snapModes, this._hotDistanceInches, IModelApp.accuSnap.keypointDivisor, this.tpHits);\r\n\r\n if (undefined !== thisSnap)\r\n IModelApp.accuDraw.onSnap(thisSnap); // AccuDraw can adjust nearest snap to intersection of circle (polar distance lock) or line (axis lock) with snapped to curve...\r\n\r\n return thisSnap;\r\n }\r\n\r\n private static arePointsCloseEnough(pt1: Point3d, pt2: Point3d, pixelDistance: number): boolean { return pt1.distance(pt2) < (pixelDistance + 1.5); }\r\n\r\n public process(ev: BeButtonEvent): void {\r\n if (undefined !== this._tentativePromise)\r\n return;\r\n\r\n const currTool = IModelApp.toolAdmin.viewTool;\r\n if (currTool && currTool.inDynamicUpdate)\r\n return; // trying to tentative snap while view is changing isn't useful...\r\n\r\n const wasActive = this.isActive;\r\n this.removeTentative(); // remove the TP cross if it is already on the screen\r\n const lastPtView = this._viewPoint.clone();\r\n\r\n this.viewport = ev.viewport!;\r\n this._point.setFrom(ev.point);\r\n this._rawPoint.setFrom(ev.rawPoint);\r\n this._viewPoint.setFrom(ev.viewPoint);\r\n\r\n const newSearch = (!this.isSnapped || !TentativePoint.arePointsCloseEnough(lastPtView, this._viewPoint, this.viewport.pixelsFromInches(IModelApp.locateManager.apertureInches)));\r\n const promise = this.getSnap(newSearch);\r\n this._tentativePromise = promise;\r\n\r\n promise.then((newSnap) => { // eslint-disable-line @typescript-eslint/no-floating-promises\r\n // Ignore response if we're no longer interested in this tentative.\r\n if (this._tentativePromise === promise) {\r\n this._tentativePromise = undefined;\r\n this.setCurrSnap(newSnap); // Adopt the snap as current\r\n IModelApp.accuSnap.clear(); // make sure there's no AccuSnap active after a tentative point (otherwise we continually snap to it).\r\n if (this.isSnapped)\r\n this._point.setFrom(this.currSnap!.snapPoint);\r\n else if (wasActive && newSearch)\r\n this._point.setFrom(ev.rawPoint);\r\n this.showTentative(); // show the TP cross\r\n\r\n if (this.isSnapped) {\r\n IModelApp.toolAdmin.adjustSnapPoint();\r\n } else if (IModelApp.accuDraw.isActive) {\r\n const point = this.getPoint().clone();\r\n const vp = ev.viewport!;\r\n if (vp.isSnapAdjustmentRequired) {\r\n IModelApp.toolAdmin.adjustPointToACS(point, vp, false);\r\n const hit = new HitDetail(point, vp, HitSource.TentativeSnap, point, \"\", HitPriority.Unknown, 0, 0);\r\n const snap = new SnapDetail(hit);\r\n this.setCurrSnap(snap);\r\n IModelApp.toolAdmin.adjustSnapPoint();\r\n this.setPoint(this.getPoint());\r\n } else {\r\n IModelApp.accuDraw.adjustPoint(point, vp, false);\r\n const savePoint = point.clone();\r\n IModelApp.toolAdmin.adjustPointToGrid(point, vp);\r\n if (!point.isExactEqual(savePoint))\r\n IModelApp.accuDraw.adjustPoint(point, vp, false);\r\n this.setPoint(point);\r\n }\r\n } else {\r\n IModelApp.toolAdmin.adjustPoint(this.getPoint(), ev.viewport!);\r\n }\r\n\r\n IModelApp.accuDraw.onTentative();\r\n if (currTool && currTool instanceof ViewManip && currTool.viewHandles.hasHandle(ViewHandleType.TargetCenter))\r\n currTool.updateTargetCenter(); // Change target center to tentative location...\r\n else\r\n IModelApp.toolAdmin.updateDynamics(undefined, undefined, true); // Don't wait for motion to update dynamics...\r\n }\r\n });\r\n }\r\n}\r\n"]}
|
package/lib/esm/ViewRect.d.ts
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
* @module Views
|
|
3
3
|
*/
|
|
4
4
|
import { LowAndHighXY, XAndY } from "@itwin/core-geometry";
|
|
5
|
-
/** A rectangle in integer view coordinates with (0,0) corresponding to the top-left corner of the view.
|
|
6
|
-
*
|
|
5
|
+
/** A rectangle in unsigned integer view coordinates with (0,0) corresponding to the top-left corner of the view.
|
|
7
6
|
* Increasing **x** moves from left to right, and increasing **y** moves from top to bottom.
|
|
7
|
+
* [[left]], [[top]], [[right]], and [[bottom]] are required to be non-negative integers; any negative inputs are treated as
|
|
8
|
+
* zero and any non-integer inputs are rounded down to the nearest integer.
|
|
8
9
|
* @public
|
|
9
10
|
* @extensions
|
|
10
11
|
*/
|
|
@@ -13,9 +14,10 @@ export declare class ViewRect {
|
|
|
13
14
|
private _top;
|
|
14
15
|
private _right;
|
|
15
16
|
private _bottom;
|
|
17
|
+
private _set;
|
|
16
18
|
/** Construct a new ViewRect. */
|
|
17
19
|
constructor(left?: number, top?: number, right?: number, bottom?: number);
|
|
18
|
-
/** The leftmost side of this ViewRect.
|
|
20
|
+
/** The leftmost side of this ViewRect. */
|
|
19
21
|
get left(): number;
|
|
20
22
|
set left(val: number);
|
|
21
23
|
/** The topmost side of this ViewRect. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewRect.d.ts","sourceRoot":"","sources":["../../src/ViewRect.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE3D
|
|
1
|
+
{"version":3,"file":"ViewRect.d.ts","sourceRoot":"","sources":["../../src/ViewRect.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE3D;;;;;;GAMG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,KAAK,CAAU;IACvB,OAAO,CAAC,IAAI,CAAU;IACtB,OAAO,CAAC,MAAM,CAAU;IACxB,OAAO,CAAC,OAAO,CAAU;IAEzB,OAAO,CAAC,IAAI;IAIZ,gCAAgC;gBACb,IAAI,SAAI,EAAE,GAAG,SAAI,EAAE,KAAK,SAAI,EAAE,MAAM,SAAI;IAC3D,0CAA0C;IAC1C,IAAW,IAAI,IAAI,MAAM,CAAuB;IAChD,IAAW,IAAI,CAAC,GAAG,EAAE,MAAM,EAA8B;IACzD,yCAAyC;IACzC,IAAW,GAAG,IAAI,MAAM,CAAsB;IAC9C,IAAW,GAAG,CAAC,GAAG,EAAE,MAAM,EAA6B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M,GAAG,IAAI;IAEzC,0EAA0E;IACnE,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAQ7D;;;;OAIG;IACI,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAE5C,8FAA8F;IACvF,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO;IAE5C;;;OAGG;IACI,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO;IAE3C,wDAAwD;IACjD,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO;IAEzC;;OAEG;IACI,cAAc,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS;CAgB7E"}
|
package/lib/esm/ViewRect.js
CHANGED
|
@@ -5,27 +5,31 @@
|
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module Views
|
|
7
7
|
*/
|
|
8
|
-
/** A rectangle in integer view coordinates with (0,0) corresponding to the top-left corner of the view.
|
|
9
|
-
*
|
|
8
|
+
/** A rectangle in unsigned integer view coordinates with (0,0) corresponding to the top-left corner of the view.
|
|
10
9
|
* Increasing **x** moves from left to right, and increasing **y** moves from top to bottom.
|
|
10
|
+
* [[left]], [[top]], [[right]], and [[bottom]] are required to be non-negative integers; any negative inputs are treated as
|
|
11
|
+
* zero and any non-integer inputs are rounded down to the nearest integer.
|
|
11
12
|
* @public
|
|
12
13
|
* @extensions
|
|
13
14
|
*/
|
|
14
15
|
export class ViewRect {
|
|
15
16
|
/** Construct a new ViewRect. */
|
|
16
17
|
constructor(left = 0, top = 0, right = 0, bottom = 0) { this.init(left, top, right, bottom); }
|
|
17
|
-
|
|
18
|
+
_set(key, value) {
|
|
19
|
+
this[key] = Math.max(0, Math.floor(value));
|
|
20
|
+
}
|
|
21
|
+
/** The leftmost side of this ViewRect. */
|
|
18
22
|
get left() { return this._left; }
|
|
19
|
-
set left(val) { this._left
|
|
23
|
+
set left(val) { this._set("_left", val); }
|
|
20
24
|
/** The topmost side of this ViewRect. */
|
|
21
25
|
get top() { return this._top; }
|
|
22
|
-
set top(val) { this._top
|
|
26
|
+
set top(val) { this._set("_top", val); }
|
|
23
27
|
/** The rightmost side of this ViewRect. */
|
|
24
28
|
get right() { return this._right; }
|
|
25
|
-
set right(val) { this._right
|
|
29
|
+
set right(val) { this._set("_right", val); }
|
|
26
30
|
/** The bottommost side of this ViewRect. */
|
|
27
31
|
get bottom() { return this._bottom; }
|
|
28
|
-
set bottom(val) { this._bottom
|
|
32
|
+
set bottom(val) { this._set("_bottom", val); }
|
|
29
33
|
/** True if this ViewRect has an area > 0. */
|
|
30
34
|
get isNull() { return this.right <= this.left || this.bottom <= this.top; }
|
|
31
35
|
/** True if `!isNull` */
|
package/lib/esm/ViewRect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewRect.js","sourceRoot":"","sources":["../../src/ViewRect.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAIH;;;;;GAKG;AACH,MAAM,OAAO,QAAQ;IAMnB,gCAAgC;IAChC,YAAmB,IAAI,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IACrG,2CAA2C;IAC3C,IAAW,IAAI,KAAa,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAChD,IAAW,IAAI,CAAC,GAAW,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC9D,yCAAyC;IACzC,IAAW,GAAG,KAAa,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9C,IAAW,GAAG,CAAC,GAAW,IAAI,IAAI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I,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAEpJ,wDAAwD;IACjD,QAAQ,CAAC,KAAe,IAAa,OAAO,IAAI,CAAC,IAAI,IAAI,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IAElK;;OAEG;IACI,cAAc,CAAC,KAAe,EAAE,GAAc;QACnD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAChD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;QAC9C,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QAClD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAEpD,IAAI,OAAO,GAAG,OAAO,IAAI,OAAO,GAAG,OAAO;YACxC,OAAO,SAAS,CAAC;QAEnB,MAAM,MAAM,GAAG,SAAS,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,QAAQ,EAAE,CAAC;QACxD,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;QACtB,MAAM,CAAC,KAAK,GAAG,OAAO,CAAC;QACvB,MAAM,CAAC,GAAG,GAAG,OAAO,CAAC;QACrB,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC;QACxB,OAAO,MAAM,CAAC;IAChB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Views\r\n */\r\n\r\nimport { LowAndHighXY, XAndY } from \"@itwin/core-geometry\";\r\n\r\n/** A rectangle in integer view coordinates with (0,0) corresponding to the top-left corner of the view.\r\n *\r\n * Increasing **x** moves from left to right, and increasing **y** moves from top to bottom.\r\n * @public\r\n * @extensions\r\n */\r\nexport class ViewRect {\r\n private _left!: number;\r\n private _top!: number;\r\n private _right!: number;\r\n private _bottom!: number;\r\n\r\n /** Construct a new ViewRect. */\r\n public constructor(left = 0, top = 0, right = 0, bottom = 0) { this.init(left, top, right, bottom); }\r\n /** The leftmost side of this ViewRect. */\r\n public get left(): number { return this._left; }\r\n public set left(val: number) { this._left = Math.floor(val); }\r\n /** The topmost side of this ViewRect. */\r\n public get top(): number { return this._top; }\r\n public set top(val: number) { this._top = Math.floor(val); }\r\n /** The rightmost side of this ViewRect. */\r\n public get right(): number { return this._right; }\r\n public set right(val: number) { this._right = Math.floor(val); }\r\n /** The bottommost side of this ViewRect. */\r\n public get bottom(): number { return this._bottom; }\r\n public set bottom(val: number) { this._bottom = Math.floor(val); }\r\n /** True if this ViewRect has an area > 0. */\r\n public get isNull(): boolean { return this.right <= this.left || this.bottom <= this.top; }\r\n /** True if `!isNull` */\r\n public get isValid(): boolean { return !this.isNull; }\r\n /** The width (right-left) of this ViewRect. */\r\n public get width() { return this.right - this.left; }\r\n public set width(width: number) { this.right = this.left + width; }\r\n /** The height (bottom-top) of this ViewRect. */\r\n public get height() { return this.bottom - this.top; }\r\n public set height(height: number) { this.bottom = this.top + height; }\r\n /** The aspect ratio (width/height) of this ViewRect. */\r\n public get aspect() { return this.isNull ? 1.0 : this.width / this.height; }\r\n /** The area (width*height) of this ViewRect. */\r\n public get area() { return this.isNull ? 0 : this.width * this.height; }\r\n /** Initialize this ViewRect from its left/top/right/bottom parameters. */\r\n public init(left: number, top: number, right: number, bottom: number) { this.left = left; this.bottom = bottom, this.right = right; this.top = top; }\r\n /** Initialize this ViewRect from two points.\r\n * @param topLeft The top-left corner.\r\n * @param bottomRight The bottom-right corner.\r\n */\r\n public initFromPoints(topLeft: XAndY, bottomRight: XAndY): void { this.init(topLeft.x, topLeft.y, bottomRight.x, bottomRight.y); }\r\n /** Initialize this ViewRect from a range.\r\n * @param input The Range to use. `input.low` defines the top-left and `input.high` defines the bottom-right.\r\n */\r\n public initFromRange(input: LowAndHighXY): void { this.initFromPoints(input.low, input.high); }\r\n /** Return true is this ViewRect is exactly equal to another ViewRect.\r\n * @param other The other ViewRect to compare\r\n */\r\n public equals(other: ViewRect): boolean { return this.left === other.left && this.right === other.right && this.bottom === other.bottom && this.top === other.top; }\r\n /** Initialize this ViewRect from another ViewRect. */\r\n public setFrom(other: ViewRect): void { this.init(other.left, other.top, other.right, other.bottom); }\r\n /** Duplicate this ViewRect.\r\n * @param result Optional ViewRect for result. If undefined, a new ViewRect is created.\r\n */\r\n public clone(result?: ViewRect): ViewRect {\r\n if (undefined !== result) {\r\n result.setFrom(this);\r\n return result;\r\n }\r\n return new ViewRect(this.left, this.top, this.right, this.bottom);\r\n }\r\n public extend(other: ViewRect) {\r\n if (this.left > other.left) this.left = other.left;\r\n if (this.top > other.top) this.top = other.top;\r\n if (this.right < other.right) this.right = other.right;\r\n if (this.bottom < other.bottom) this.bottom = other.bottom;\r\n }\r\n\r\n /** Inset this ViewRect by values in the x and y directions. Positive values make the ViewRect smaller, and negative values will make it larger.\r\n * @param deltaX The distance to inset the ViewRect in the x direction.\r\n * @param deltaY The distance to inset the ViewRect in the y direction.\r\n */\r\n public inset(deltaX: number, deltaY: number): void {\r\n deltaX = Math.floor(deltaX);\r\n deltaY = Math.floor(deltaY);\r\n if (this.width - 2 * deltaX <= 0 || this.height - 2 * deltaY <= 0) {\r\n this.init(0, 0, 0, 0);\r\n return;\r\n }\r\n this._left += deltaX;\r\n this._right -= deltaX;\r\n this._top += deltaY;\r\n this._bottom -= deltaY;\r\n }\r\n\r\n /** Inset this ViewRect by the same value in all directions.\r\n * @param offset The distance to inset this ViewRect. Positive values will make this ViewRect smaller and negative values will make it larger.\r\n * @note The inset operation can cause a previously valid ViewRect to become invalid.\r\n */\r\n public insetUniform(offset: number): void { this.inset(offset, offset); }\r\n\r\n /** Scale this ViewRect about its center by the supplied scale factors. */\r\n public scaleAboutCenter(xScale: number, yScale: number): void {\r\n const w = this.width;\r\n const h = this.height;\r\n const xDelta = (w - (w * xScale)) * 0.5;\r\n const yDelta = (h - (h * yScale)) * 0.5;\r\n this.inset(xDelta, yDelta);\r\n }\r\n\r\n /** Inset this ViewRect by a percentage of its current width.\r\n * @param percent The percentage of this ViewRect's width to inset in all directions.\r\n * @note The ViewRect will become smaller (or larger, if percent is negative) by `percent * width * 2` in each direction, since each side is moved by that distance.\r\n * @see [[inset]]\r\n */\r\n public insetByPercent(percent: number): void { this.insetUniform(this.width * percent); }\r\n\r\n /** Determine if this ViewRect is entirely contained within the bounds of another ViewRect. */\r\n public isContained(other: ViewRect): boolean { return this.left >= other.left && this.right <= other.right && this.bottom <= other.bottom && this.top >= other.top; }\r\n\r\n /** Return true if the supplied point is contained in this ViewRect.\r\n * @param point The point to test.\r\n * @note if the point is exactly on the left or top edges, this method returns true. If the point is exactly on the right or bottom edge, it returns false.\r\n */\r\n public containsPoint(point: XAndY): boolean { return point.x >= this.left && point.x < this.right && point.y >= this.top && point.y < this.bottom; }\r\n\r\n /** Determine whether this ViewRect overlaps another. */\r\n public overlaps(other: ViewRect): boolean { return this.left <= other.right && this.top <= other.bottom && this.right >= other.left && this.bottom >= other.top; }\r\n\r\n /** Return a ViewRect that is the overlap (intersection) of this ViewRect and another ViewRect.\r\n * If the two ViewRects are equal, their value is the result. Otherwise, the result will always be smaller than either of them.\r\n */\r\n public computeOverlap(other: ViewRect, out?: ViewRect): ViewRect | undefined {\r\n const maxOrgX = Math.max(this.left, other.left);\r\n const maxOrgY = Math.max(this.top, other.top);\r\n const minCrnX = Math.min(this.right, other.right);\r\n const minCrnY = Math.min(this.bottom, other.bottom);\r\n\r\n if (maxOrgX > minCrnX || maxOrgY > minCrnY)\r\n return undefined;\r\n\r\n const result = undefined !== out ? out : new ViewRect();\r\n result.left = maxOrgX;\r\n result.right = minCrnX;\r\n result.top = maxOrgY;\r\n result.bottom = minCrnY;\r\n return result;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ViewRect.js","sourceRoot":"","sources":["../../src/ViewRect.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAIH;;;;;;GAMG;AACH,MAAM,OAAO,QAAQ;IAUnB,gCAAgC;IAChC,YAAmB,IAAI,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAL7F,IAAI,CAAC,GAA4C,EAAE,KAAa;QACtE,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7C,CAAC;IAID,0CAA0C;IAC1C,IAAW,IAAI,KAAa,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAChD,IAAW,IAAI,CAAC,GAAW,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IACzD,yCAAyC;IACzC,IAAW,GAAG,KAAa,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9C,IAAW,GAAG,CAAC,GAAW,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;IACvD,2CAA2C;IAC3C,IAAW,KAAK,KAAa,OAAO,IAAI,CAAC,MAAM,CAAC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,IAAI,CAAC,GAAG,IAAI,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IAElK;;OAEG;IACI,cAAc,CAAC,KAAe,EAAE,GAAc;QACnD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAChD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;QAC9C,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QAClD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAEpD,IAAI,OAAO,GAAG,OAAO,IAAI,OAAO,GAAG,OAAO;YACxC,OAAO,SAAS,CAAC;QAEnB,MAAM,MAAM,GAAG,SAAS,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,QAAQ,EAAE,CAAC;QACxD,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;QACtB,MAAM,CAAC,KAAK,GAAG,OAAO,CAAC;QACvB,MAAM,CAAC,GAAG,GAAG,OAAO,CAAC;QACrB,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC;QACxB,OAAO,MAAM,CAAC;IAChB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Views\r\n */\r\n\r\nimport { LowAndHighXY, XAndY } from \"@itwin/core-geometry\";\r\n\r\n/** A rectangle in unsigned integer view coordinates with (0,0) corresponding to the top-left corner of the view.\r\n * Increasing **x** moves from left to right, and increasing **y** moves from top to bottom.\r\n * [[left]], [[top]], [[right]], and [[bottom]] are required to be non-negative integers; any negative inputs are treated as\r\n * zero and any non-integer inputs are rounded down to the nearest integer.\r\n * @public\r\n * @extensions\r\n */\r\nexport class ViewRect {\r\n private _left!: number;\r\n private _top!: number;\r\n private _right!: number;\r\n private _bottom!: number;\r\n\r\n private _set(key: \"_left\" | \"_right\" | \"_top\" | \"_bottom\", value: number): void {\r\n this[key] = Math.max(0, Math.floor(value));\r\n }\r\n\r\n /** Construct a new ViewRect. */\r\n public constructor(left = 0, top = 0, right = 0, bottom = 0) { this.init(left, top, right, bottom); }\r\n /** The leftmost side of this ViewRect. */\r\n public get left(): number { return this._left; }\r\n public set left(val: number) { this._set(\"_left\", val); }\r\n /** The topmost side of this ViewRect. */\r\n public get top(): number { return this._top; }\r\n public set top(val: number) { this._set(\"_top\", val); }\r\n /** The rightmost side of this ViewRect. */\r\n public get right(): number { return this._right; }\r\n public set right(val: number) { this._set(\"_right\", val); }\r\n /** The bottommost side of this ViewRect. */\r\n public get bottom(): number { return this._bottom; }\r\n public set bottom(val: number) { this._set(\"_bottom\", val); }\r\n /** True if this ViewRect has an area > 0. */\r\n public get isNull(): boolean { return this.right <= this.left || this.bottom <= this.top; }\r\n /** True if `!isNull` */\r\n public get isValid(): boolean { return !this.isNull; }\r\n /** The width (right-left) of this ViewRect. */\r\n public get width() { return this.right - this.left; }\r\n public set width(width: number) { this.right = this.left + width; }\r\n /** The height (bottom-top) of this ViewRect. */\r\n public get height() { return this.bottom - this.top; }\r\n public set height(height: number) { this.bottom = this.top + height; }\r\n /** The aspect ratio (width/height) of this ViewRect. */\r\n public get aspect() { return this.isNull ? 1.0 : this.width / this.height; }\r\n /** The area (width*height) of this ViewRect. */\r\n public get area() { return this.isNull ? 0 : this.width * this.height; }\r\n /** Initialize this ViewRect from its left/top/right/bottom parameters. */\r\n public init(left: number, top: number, right: number, bottom: number) { this.left = left; this.bottom = bottom, this.right = right; this.top = top; }\r\n /** Initialize this ViewRect from two points.\r\n * @param topLeft The top-left corner.\r\n * @param bottomRight The bottom-right corner.\r\n */\r\n public initFromPoints(topLeft: XAndY, bottomRight: XAndY): void { this.init(topLeft.x, topLeft.y, bottomRight.x, bottomRight.y); }\r\n /** Initialize this ViewRect from a range.\r\n * @param input The Range to use. `input.low` defines the top-left and `input.high` defines the bottom-right.\r\n */\r\n public initFromRange(input: LowAndHighXY): void { this.initFromPoints(input.low, input.high); }\r\n /** Return true is this ViewRect is exactly equal to another ViewRect.\r\n * @param other The other ViewRect to compare\r\n */\r\n public equals(other: ViewRect): boolean { return this.left === other.left && this.right === other.right && this.bottom === other.bottom && this.top === other.top; }\r\n /** Initialize this ViewRect from another ViewRect. */\r\n public setFrom(other: ViewRect): void { this.init(other.left, other.top, other.right, other.bottom); }\r\n /** Duplicate this ViewRect.\r\n * @param result Optional ViewRect for result. If undefined, a new ViewRect is created.\r\n */\r\n public clone(result?: ViewRect): ViewRect {\r\n if (undefined !== result) {\r\n result.setFrom(this);\r\n return result;\r\n }\r\n return new ViewRect(this.left, this.top, this.right, this.bottom);\r\n }\r\n public extend(other: ViewRect) {\r\n if (this.left > other.left) this.left = other.left;\r\n if (this.top > other.top) this.top = other.top;\r\n if (this.right < other.right) this.right = other.right;\r\n if (this.bottom < other.bottom) this.bottom = other.bottom;\r\n }\r\n\r\n /** Inset this ViewRect by values in the x and y directions. Positive values make the ViewRect smaller, and negative values will make it larger.\r\n * @param deltaX The distance to inset the ViewRect in the x direction.\r\n * @param deltaY The distance to inset the ViewRect in the y direction.\r\n */\r\n public inset(deltaX: number, deltaY: number): void {\r\n deltaX = Math.floor(deltaX);\r\n deltaY = Math.floor(deltaY);\r\n if (this.width - 2 * deltaX <= 0 || this.height - 2 * deltaY <= 0) {\r\n this.init(0, 0, 0, 0);\r\n return;\r\n }\r\n this._left += deltaX;\r\n this._right -= deltaX;\r\n this._top += deltaY;\r\n this._bottom -= deltaY;\r\n }\r\n\r\n /** Inset this ViewRect by the same value in all directions.\r\n * @param offset The distance to inset this ViewRect. Positive values will make this ViewRect smaller and negative values will make it larger.\r\n * @note The inset operation can cause a previously valid ViewRect to become invalid.\r\n */\r\n public insetUniform(offset: number): void { this.inset(offset, offset); }\r\n\r\n /** Scale this ViewRect about its center by the supplied scale factors. */\r\n public scaleAboutCenter(xScale: number, yScale: number): void {\r\n const w = this.width;\r\n const h = this.height;\r\n const xDelta = (w - (w * xScale)) * 0.5;\r\n const yDelta = (h - (h * yScale)) * 0.5;\r\n this.inset(xDelta, yDelta);\r\n }\r\n\r\n /** Inset this ViewRect by a percentage of its current width.\r\n * @param percent The percentage of this ViewRect's width to inset in all directions.\r\n * @note The ViewRect will become smaller (or larger, if percent is negative) by `percent * width * 2` in each direction, since each side is moved by that distance.\r\n * @see [[inset]]\r\n */\r\n public insetByPercent(percent: number): void { this.insetUniform(this.width * percent); }\r\n\r\n /** Determine if this ViewRect is entirely contained within the bounds of another ViewRect. */\r\n public isContained(other: ViewRect): boolean { return this.left >= other.left && this.right <= other.right && this.bottom <= other.bottom && this.top >= other.top; }\r\n\r\n /** Return true if the supplied point is contained in this ViewRect.\r\n * @param point The point to test.\r\n * @note if the point is exactly on the left or top edges, this method returns true. If the point is exactly on the right or bottom edge, it returns false.\r\n */\r\n public containsPoint(point: XAndY): boolean { return point.x >= this.left && point.x < this.right && point.y >= this.top && point.y < this.bottom; }\r\n\r\n /** Determine whether this ViewRect overlaps another. */\r\n public overlaps(other: ViewRect): boolean { return this.left <= other.right && this.top <= other.bottom && this.right >= other.left && this.bottom >= other.top; }\r\n\r\n /** Return a ViewRect that is the overlap (intersection) of this ViewRect and another ViewRect.\r\n * If the two ViewRects are equal, their value is the result. Otherwise, the result will always be smaller than either of them.\r\n */\r\n public computeOverlap(other: ViewRect, out?: ViewRect): ViewRect | undefined {\r\n const maxOrgX = Math.max(this.left, other.left);\r\n const maxOrgY = Math.max(this.top, other.top);\r\n const minCrnX = Math.min(this.right, other.right);\r\n const minCrnY = Math.min(this.bottom, other.bottom);\r\n\r\n if (maxOrgX > minCrnX || maxOrgY > minCrnY)\r\n return undefined;\r\n\r\n const result = undefined !== out ? out : new ViewRect();\r\n result.left = maxOrgX;\r\n result.right = minCrnX;\r\n result.top = maxOrgY;\r\n result.bottom = minCrnY;\r\n return result;\r\n }\r\n}\r\n"]}
|
package/lib/esm/ViewState.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ import { IModelConnection } from "./IModelConnection";
|
|
|
13
13
|
import { GeometricModel2dState, GeometricModelState } from "./ModelState";
|
|
14
14
|
import { RenderClipVolume } from "./render/RenderClipVolume";
|
|
15
15
|
import { RenderMemory } from "./render/RenderMemory";
|
|
16
|
-
import { RenderScheduleState } from "./RenderScheduleState";
|
|
17
16
|
import { SheetViewState } from "./SheetViewState";
|
|
18
17
|
import { SpatialViewState } from "./SpatialViewState";
|
|
19
18
|
import { StandardViewId } from "./StandardView";
|
|
@@ -159,7 +158,7 @@ export declare abstract class ViewState extends ElementState {
|
|
|
159
158
|
*/
|
|
160
159
|
get scheduleScript(): RenderSchedule.Script | undefined;
|
|
161
160
|
/** @internal */
|
|
162
|
-
get
|
|
161
|
+
get scheduleScriptReference(): RenderSchedule.ScriptReference | undefined;
|
|
163
162
|
/** Get the globe projection mode.
|
|
164
163
|
* @internal
|
|
165
164
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewState.d.ts","sourceRoot":"","sources":["../../src/ViewState.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,OAAO,EAAiB,OAAO,EAAE,UAAU,EAAa,MAAM,qBAAqB,CAAC;AACrG,OAAO,EACL,KAAK,EAAa,UAAU,EAA+C,YAAY,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EACzF,OAAO,EAAE,OAAO,EAAW,OAAO,EAAS,SAAS,EAAY,QAAQ,EAA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QAAQ,IAAI,QAAQ;IAE3B,gBAAgB;IACT,SAAS,CAAC,GAAG,EAAE,UAAU;IAOhC,yCAAyC;IAClC,cAAc,IAAI,qBAAqB,GAAG,SAAS;IAQ1D;;;;;OAKG;IACU,iBAAiB,CAAC,gBAAgB,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IASpE,eAAe,IAAI,OAAO;IAIjC,gBAAgB;cACG,OAAO,CAAC,cAAc,EAAE,4BAA4B,GAAG,IAAI;IAM9E,gBAAgB;cACS,QAAQ,CAAC,eAAe,EAAE,6BAA6B,GAAG,OAAO,CAAC,IAAI,CAAC;IAQhG,iEAAiE;IACjE,IAAW,OAAO,IAAI,WAAW,CAEhC;IAEM,oBAAoB,IAAI,OAAO;IAC/B,SAAS;IACT,UAAU;IACV,WAAW;IACX,UAAU,CAAC,KAAK,EAAE,KAAK;IACvB,SAAS,CAAC,MAAM,EAAE,KAAK;IACvB,WAAW,CAAC,GAAG,EAAE,QAAQ;IACzB,UAAU,CAAC,OAAO,EAAE,UAAU;IAC9B,YAAY,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI;IAM9D,gBAAgB;IACA,mBAAmB,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,IAAI,GAAG,IAAI;IAM1E,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,mBAAmB;CAClE"}
|
package/lib/esm/ViewState.js
CHANGED
|
@@ -155,8 +155,8 @@ export class ViewState extends ElementState {
|
|
|
155
155
|
return this.displayStyle.scheduleScript;
|
|
156
156
|
}
|
|
157
157
|
/** @internal */
|
|
158
|
-
get
|
|
159
|
-
return this.displayStyle.
|
|
158
|
+
get scheduleScriptReference() {
|
|
159
|
+
return this.displayStyle.scheduleScriptReference; // eslint-disable-line deprecation/deprecation
|
|
160
160
|
}
|
|
161
161
|
/** Get the globe projection mode.
|
|
162
162
|
* @internal
|
|
@@ -202,6 +202,10 @@ export class ViewState extends ElementState {
|
|
|
202
202
|
* @see [Views]($docs/learning/frontend/Views.md)
|
|
203
203
|
*/
|
|
204
204
|
async load() {
|
|
205
|
+
// If the iModel associated with the viewState is a blankConnection,
|
|
206
|
+
// then no data can be retrieved from the backend.
|
|
207
|
+
if (this.iModel.isBlank)
|
|
208
|
+
return;
|
|
205
209
|
const hydrateRequest = {};
|
|
206
210
|
this.preload(hydrateRequest);
|
|
207
211
|
const promises = [
|