@itwin/core-frontend 5.11.0-dev.9 → 5.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -1
- package/lib/cjs/AccuDraw.d.ts +2 -0
- package/lib/cjs/AccuDraw.d.ts.map +1 -1
- package/lib/cjs/AccuDraw.js +9 -1
- package/lib/cjs/AccuDraw.js.map +1 -1
- package/lib/cjs/BingLocation.d.ts +4 -0
- package/lib/cjs/BingLocation.d.ts.map +1 -1
- package/lib/cjs/BingLocation.js +6 -1
- package/lib/cjs/BingLocation.js.map +1 -1
- package/lib/cjs/CesiumAccessClient.d.ts +52 -0
- package/lib/cjs/CesiumAccessClient.d.ts.map +1 -0
- package/lib/cjs/CesiumAccessClient.js +10 -0
- package/lib/cjs/CesiumAccessClient.js.map +1 -0
- package/lib/cjs/DisplayStyleState.js +2 -2
- package/lib/cjs/DisplayStyleState.js.map +1 -1
- package/lib/cjs/GeoProviders.d.ts +45 -0
- package/lib/cjs/GeoProviders.d.ts.map +1 -0
- package/lib/cjs/GeoProviders.js +49 -0
- package/lib/cjs/GeoProviders.js.map +1 -0
- package/lib/cjs/GraphicalEditingScope.d.ts +22 -1
- package/lib/cjs/GraphicalEditingScope.d.ts.map +1 -1
- package/lib/cjs/GraphicalEditingScope.js +27 -1
- package/lib/cjs/GraphicalEditingScope.js.map +1 -1
- package/lib/cjs/HitDetail.d.ts +1 -1
- package/lib/cjs/HitDetail.d.ts.map +1 -1
- package/lib/cjs/HitDetail.js +10 -7
- package/lib/cjs/HitDetail.js.map +1 -1
- package/lib/cjs/IModelApp.d.ts +33 -0
- package/lib/cjs/IModelApp.d.ts.map +1 -1
- package/lib/cjs/IModelApp.js +33 -0
- package/lib/cjs/IModelApp.js.map +1 -1
- package/lib/cjs/IModelConnection.d.ts +9 -9
- package/lib/cjs/IModelConnection.d.ts.map +1 -1
- package/lib/cjs/IModelConnection.js +21 -14
- package/lib/cjs/IModelConnection.js.map +1 -1
- package/lib/cjs/IpcApp.d.ts +1 -1
- package/lib/cjs/IpcApp.js +1 -1
- package/lib/cjs/IpcApp.js.map +1 -1
- package/lib/cjs/NativeApp.d.ts.map +1 -1
- package/lib/cjs/NativeApp.js +1 -3
- package/lib/cjs/NativeApp.js.map +1 -1
- package/lib/cjs/RealityDataSourceCesiumIonAssetImpl.d.ts +1 -1
- package/lib/cjs/RealityDataSourceCesiumIonAssetImpl.d.ts.map +1 -1
- package/lib/cjs/RealityDataSourceCesiumIonAssetImpl.js +23 -5
- package/lib/cjs/RealityDataSourceCesiumIonAssetImpl.js.map +1 -1
- package/lib/cjs/SelectionSet.d.ts +7 -7
- package/lib/cjs/SelectionSet.js +3 -3
- package/lib/cjs/SelectionSet.js.map +1 -1
- package/lib/cjs/SubCategoriesCache.d.ts +15 -3
- package/lib/cjs/SubCategoriesCache.d.ts.map +1 -1
- package/lib/cjs/SubCategoriesCache.js +98 -26
- package/lib/cjs/SubCategoriesCache.js.map +1 -1
- package/lib/cjs/ViewGlobalLocation.d.ts +1 -1
- package/lib/cjs/ViewGlobalLocation.d.ts.map +1 -1
- package/lib/cjs/ViewGlobalLocation.js +3 -6
- package/lib/cjs/ViewGlobalLocation.js.map +1 -1
- package/lib/cjs/ViewState.d.ts +1 -1
- package/lib/cjs/ViewState.js +1 -1
- package/lib/cjs/ViewState.js.map +1 -1
- package/lib/cjs/Viewport.d.ts +5 -4
- package/lib/cjs/Viewport.d.ts.map +1 -1
- package/lib/cjs/Viewport.js +16 -4
- package/lib/cjs/Viewport.js.map +1 -1
- package/lib/cjs/core-frontend.d.ts +3 -0
- package/lib/cjs/core-frontend.d.ts.map +1 -1
- package/lib/cjs/core-frontend.js +4 -0
- package/lib/cjs/core-frontend.js.map +1 -1
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.d.ts +1 -1
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.js +1 -1
- package/lib/cjs/internal/render/webgl/AtmosphereUniforms.js.map +1 -1
- package/lib/cjs/internal/render/webgl/AttributeBuffers.d.ts +2 -2
- package/lib/cjs/internal/render/webgl/AttributeBuffers.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/AttributeBuffers.js +2 -2
- package/lib/cjs/internal/render/webgl/AttributeBuffers.js.map +1 -1
- package/lib/cjs/internal/render/webgl/ClippingProgram.d.ts +1 -1
- package/lib/cjs/internal/render/webgl/ClippingProgram.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/ClippingProgram.js +1 -1
- package/lib/cjs/internal/render/webgl/ClippingProgram.js.map +1 -1
- package/lib/cjs/internal/render/webgl/ShaderProgram.d.ts +2 -2
- package/lib/cjs/internal/render/webgl/ShaderProgram.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/ShaderProgram.js +2 -2
- package/lib/cjs/internal/render/webgl/ShaderProgram.js.map +1 -1
- package/lib/cjs/internal/render/webgl/Technique.d.ts +3 -3
- package/lib/cjs/internal/render/webgl/Technique.d.ts.map +1 -1
- package/lib/cjs/internal/render/webgl/Technique.js +3 -3
- package/lib/cjs/internal/render/webgl/Technique.js.map +1 -1
- package/lib/cjs/internal/tile/DynamicIModelTile.d.ts +3 -3
- package/lib/cjs/internal/tile/DynamicIModelTile.d.ts.map +1 -1
- package/lib/cjs/internal/tile/DynamicIModelTile.js +26 -6
- package/lib/cjs/internal/tile/DynamicIModelTile.js.map +1 -1
- package/lib/cjs/internal/tile/IModelTileTree.d.ts.map +1 -1
- package/lib/cjs/internal/tile/IModelTileTree.js +4 -2
- package/lib/cjs/internal/tile/IModelTileTree.js.map +1 -1
- package/lib/cjs/internal/tile/RealityModelTileTree.d.ts +1 -1
- package/lib/cjs/internal/tile/RealityModelTileTree.d.ts.map +1 -1
- package/lib/cjs/internal/tile/RealityModelTileTree.js +7 -3
- package/lib/cjs/internal/tile/RealityModelTileTree.js.map +1 -1
- package/lib/cjs/internal/tile/RealityTileLoader.d.ts +22 -0
- package/lib/cjs/internal/tile/RealityTileLoader.d.ts.map +1 -1
- package/lib/cjs/internal/tile/RealityTileLoader.js +53 -5
- package/lib/cjs/internal/tile/RealityTileLoader.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts +2 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.js +2 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js +1 -1
- package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js.map +1 -1
- package/lib/cjs/properties/AngleDescription.d.ts +2 -1
- package/lib/cjs/properties/AngleDescription.d.ts.map +1 -1
- package/lib/cjs/properties/AngleDescription.js +4 -1
- package/lib/cjs/properties/AngleDescription.js.map +1 -1
- package/lib/cjs/properties/FormattedQuantityDescription.d.ts +29 -1
- package/lib/cjs/properties/FormattedQuantityDescription.d.ts.map +1 -1
- package/lib/cjs/properties/FormattedQuantityDescription.js +35 -0
- package/lib/cjs/properties/FormattedQuantityDescription.js.map +1 -1
- package/lib/cjs/properties/LengthDescription.d.ts +6 -3
- package/lib/cjs/properties/LengthDescription.d.ts.map +1 -1
- package/lib/cjs/properties/LengthDescription.js +12 -3
- package/lib/cjs/properties/LengthDescription.js.map +1 -1
- package/lib/cjs/render/Decorations.d.ts +1 -1
- package/lib/cjs/render/Decorations.d.ts.map +1 -1
- package/lib/cjs/render/Decorations.js +1 -1
- package/lib/cjs/render/Decorations.js.map +1 -1
- package/lib/cjs/render/GraphicBranch.d.ts +1 -1
- package/lib/cjs/render/GraphicBranch.d.ts.map +1 -1
- package/lib/cjs/render/GraphicBranch.js +1 -1
- package/lib/cjs/render/GraphicBranch.js.map +1 -1
- package/lib/cjs/render/RenderSystem.d.ts +2 -2
- package/lib/cjs/render/RenderSystem.d.ts.map +1 -1
- package/lib/cjs/render/RenderSystem.js +1 -1
- package/lib/cjs/render/RenderSystem.js.map +1 -1
- package/lib/cjs/render/ScreenSpaceEffectBuilder.d.ts +1 -1
- package/lib/cjs/render/ScreenSpaceEffectBuilder.js.map +1 -1
- package/lib/cjs/request/Request.d.ts +2 -2
- package/lib/cjs/request/Request.js.map +1 -1
- package/lib/cjs/tile/RealityTile.d.ts +5 -0
- package/lib/cjs/tile/RealityTile.d.ts.map +1 -1
- package/lib/cjs/tile/RealityTile.js +4 -0
- package/lib/cjs/tile/RealityTile.js.map +1 -1
- package/lib/cjs/tile/Tile.d.ts +1 -1
- package/lib/cjs/tile/Tile.d.ts.map +1 -1
- package/lib/cjs/tile/Tile.js +1 -1
- package/lib/cjs/tile/Tile.js.map +1 -1
- package/lib/cjs/tile/TileAdmin.d.ts +23 -1
- package/lib/cjs/tile/TileAdmin.d.ts.map +1 -1
- package/lib/cjs/tile/TileAdmin.js +17 -1
- package/lib/cjs/tile/TileAdmin.js.map +1 -1
- package/lib/cjs/tile/TileTree.d.ts +1 -1
- package/lib/cjs/tile/TileTree.d.ts.map +1 -1
- package/lib/cjs/tile/TileTree.js +1 -1
- package/lib/cjs/tile/TileTree.js.map +1 -1
- package/lib/cjs/tile/TileTreeReference.d.ts +1 -1
- package/lib/cjs/tile/TileTreeReference.d.ts.map +1 -1
- package/lib/cjs/tile/TileTreeReference.js +1 -1
- package/lib/cjs/tile/TileTreeReference.js.map +1 -1
- package/lib/cjs/tile/map/BingElevation.d.ts +16 -4
- package/lib/cjs/tile/map/BingElevation.d.ts.map +1 -1
- package/lib/cjs/tile/map/BingElevation.js +18 -8
- package/lib/cjs/tile/map/BingElevation.js.map +1 -1
- package/lib/cjs/tile/map/CesiumTerrainProvider.d.ts +16 -1
- package/lib/cjs/tile/map/CesiumTerrainProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/CesiumTerrainProvider.js +58 -18
- package/lib/cjs/tile/map/CesiumTerrainProvider.js.map +1 -1
- package/lib/cjs/tile/map/ImageryTileTree.d.ts +2 -2
- package/lib/cjs/tile/map/ImageryTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/map/ImageryTileTree.js +2 -2
- package/lib/cjs/tile/map/ImageryTileTree.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerFormatRegistry.d.ts +6 -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/MapLayerImageryFormats.d.ts +1 -0
- package/lib/cjs/tile/map/MapLayerImageryFormats.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryFormats.js +3 -0
- package/lib/cjs/tile/map/MapLayerImageryFormats.js.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.js +1 -1
- package/lib/cjs/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/cjs/tile/map/MapTileTree.d.ts +1 -1
- package/lib/cjs/tile/map/MapTileTree.d.ts.map +1 -1
- package/lib/cjs/tile/map/MapTileTree.js +20 -9
- package/lib/cjs/tile/map/MapTileTree.js.map +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.d.ts +7 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.d.ts.map +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.js +1 -1
- package/lib/cjs/tile/map/TerrainMeshProvider.js.map +1 -1
- package/lib/cjs/tools/AccuDrawShortcutTool.d.ts +29 -0
- package/lib/cjs/tools/AccuDrawShortcutTool.d.ts.map +1 -0
- package/lib/cjs/tools/AccuDrawShortcutTool.js +139 -0
- package/lib/cjs/tools/AccuDrawShortcutTool.js.map +1 -0
- package/lib/cjs/tools/AccuDrawTool.d.ts +13 -68
- package/lib/cjs/tools/AccuDrawTool.d.ts.map +1 -1
- package/lib/cjs/tools/AccuDrawTool.js +103 -129
- package/lib/cjs/tools/AccuDrawTool.js.map +1 -1
- package/lib/cjs/tools/SetupCameraTools.d.ts +89 -0
- package/lib/cjs/tools/SetupCameraTools.d.ts.map +1 -0
- package/lib/cjs/tools/SetupCameraTools.js +444 -0
- package/lib/cjs/tools/SetupCameraTools.js.map +1 -0
- package/lib/cjs/tools/ToolAdmin.d.ts +5 -2
- package/lib/cjs/tools/ToolAdmin.d.ts.map +1 -1
- package/lib/cjs/tools/ToolAdmin.js +30 -7
- package/lib/cjs/tools/ToolAdmin.js.map +1 -1
- package/lib/cjs/tools/ViewTool.d.ts +1 -81
- package/lib/cjs/tools/ViewTool.d.ts.map +1 -1
- package/lib/cjs/tools/ViewTool.js +13 -410
- package/lib/cjs/tools/ViewTool.js.map +1 -1
- package/lib/esm/AccuDraw.d.ts +2 -0
- package/lib/esm/AccuDraw.d.ts.map +1 -1
- package/lib/esm/AccuDraw.js +9 -1
- package/lib/esm/AccuDraw.js.map +1 -1
- package/lib/esm/BingLocation.d.ts +4 -0
- package/lib/esm/BingLocation.d.ts.map +1 -1
- package/lib/esm/BingLocation.js +6 -1
- package/lib/esm/BingLocation.js.map +1 -1
- package/lib/esm/CesiumAccessClient.d.ts +52 -0
- package/lib/esm/CesiumAccessClient.d.ts.map +1 -0
- package/lib/esm/CesiumAccessClient.js +9 -0
- package/lib/esm/CesiumAccessClient.js.map +1 -0
- package/lib/esm/DisplayStyleState.js +2 -2
- package/lib/esm/DisplayStyleState.js.map +1 -1
- package/lib/esm/GeoProviders.d.ts +45 -0
- package/lib/esm/GeoProviders.d.ts.map +1 -0
- package/lib/esm/GeoProviders.js +45 -0
- package/lib/esm/GeoProviders.js.map +1 -0
- package/lib/esm/GraphicalEditingScope.d.ts +22 -1
- package/lib/esm/GraphicalEditingScope.d.ts.map +1 -1
- package/lib/esm/GraphicalEditingScope.js +27 -1
- package/lib/esm/GraphicalEditingScope.js.map +1 -1
- package/lib/esm/HitDetail.d.ts +1 -1
- package/lib/esm/HitDetail.d.ts.map +1 -1
- package/lib/esm/HitDetail.js +11 -8
- package/lib/esm/HitDetail.js.map +1 -1
- package/lib/esm/IModelApp.d.ts +33 -0
- package/lib/esm/IModelApp.d.ts.map +1 -1
- package/lib/esm/IModelApp.js +34 -1
- package/lib/esm/IModelApp.js.map +1 -1
- package/lib/esm/IModelConnection.d.ts +9 -9
- package/lib/esm/IModelConnection.d.ts.map +1 -1
- package/lib/esm/IModelConnection.js +21 -14
- package/lib/esm/IModelConnection.js.map +1 -1
- package/lib/esm/IpcApp.d.ts +1 -1
- package/lib/esm/IpcApp.js +1 -1
- package/lib/esm/IpcApp.js.map +1 -1
- package/lib/esm/NativeApp.d.ts.map +1 -1
- package/lib/esm/NativeApp.js +1 -3
- package/lib/esm/NativeApp.js.map +1 -1
- package/lib/esm/RealityDataSourceCesiumIonAssetImpl.d.ts +1 -1
- package/lib/esm/RealityDataSourceCesiumIonAssetImpl.d.ts.map +1 -1
- package/lib/esm/RealityDataSourceCesiumIonAssetImpl.js +24 -6
- package/lib/esm/RealityDataSourceCesiumIonAssetImpl.js.map +1 -1
- package/lib/esm/SelectionSet.d.ts +7 -7
- package/lib/esm/SelectionSet.js +3 -3
- package/lib/esm/SelectionSet.js.map +1 -1
- package/lib/esm/SubCategoriesCache.d.ts +15 -3
- package/lib/esm/SubCategoriesCache.d.ts.map +1 -1
- package/lib/esm/SubCategoriesCache.js +99 -27
- package/lib/esm/SubCategoriesCache.js.map +1 -1
- package/lib/esm/ViewGlobalLocation.d.ts +1 -1
- package/lib/esm/ViewGlobalLocation.d.ts.map +1 -1
- package/lib/esm/ViewGlobalLocation.js +3 -6
- package/lib/esm/ViewGlobalLocation.js.map +1 -1
- package/lib/esm/ViewState.d.ts +1 -1
- package/lib/esm/ViewState.js +1 -1
- package/lib/esm/ViewState.js.map +1 -1
- package/lib/esm/Viewport.d.ts +5 -4
- package/lib/esm/Viewport.d.ts.map +1 -1
- package/lib/esm/Viewport.js +16 -4
- package/lib/esm/Viewport.js.map +1 -1
- package/lib/esm/core-frontend.d.ts +3 -0
- package/lib/esm/core-frontend.d.ts.map +1 -1
- package/lib/esm/core-frontend.js +6 -1
- package/lib/esm/core-frontend.js.map +1 -1
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.d.ts +1 -1
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.js +1 -1
- package/lib/esm/internal/render/webgl/AtmosphereUniforms.js.map +1 -1
- package/lib/esm/internal/render/webgl/AttributeBuffers.d.ts +2 -2
- package/lib/esm/internal/render/webgl/AttributeBuffers.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/AttributeBuffers.js +2 -2
- package/lib/esm/internal/render/webgl/AttributeBuffers.js.map +1 -1
- package/lib/esm/internal/render/webgl/ClippingProgram.d.ts +1 -1
- package/lib/esm/internal/render/webgl/ClippingProgram.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/ClippingProgram.js +1 -1
- package/lib/esm/internal/render/webgl/ClippingProgram.js.map +1 -1
- package/lib/esm/internal/render/webgl/ShaderProgram.d.ts +2 -2
- package/lib/esm/internal/render/webgl/ShaderProgram.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/ShaderProgram.js +2 -2
- package/lib/esm/internal/render/webgl/ShaderProgram.js.map +1 -1
- package/lib/esm/internal/render/webgl/Technique.d.ts +3 -3
- package/lib/esm/internal/render/webgl/Technique.d.ts.map +1 -1
- package/lib/esm/internal/render/webgl/Technique.js +3 -3
- package/lib/esm/internal/render/webgl/Technique.js.map +1 -1
- package/lib/esm/internal/tile/DynamicIModelTile.d.ts +3 -3
- package/lib/esm/internal/tile/DynamicIModelTile.d.ts.map +1 -1
- package/lib/esm/internal/tile/DynamicIModelTile.js +26 -6
- package/lib/esm/internal/tile/DynamicIModelTile.js.map +1 -1
- package/lib/esm/internal/tile/IModelTileTree.d.ts.map +1 -1
- package/lib/esm/internal/tile/IModelTileTree.js +4 -2
- package/lib/esm/internal/tile/IModelTileTree.js.map +1 -1
- package/lib/esm/internal/tile/RealityModelTileTree.d.ts +1 -1
- package/lib/esm/internal/tile/RealityModelTileTree.d.ts.map +1 -1
- package/lib/esm/internal/tile/RealityModelTileTree.js +7 -3
- package/lib/esm/internal/tile/RealityModelTileTree.js.map +1 -1
- package/lib/esm/internal/tile/RealityTileLoader.d.ts +22 -0
- package/lib/esm/internal/tile/RealityTileLoader.d.ts.map +1 -1
- package/lib/esm/internal/tile/RealityTileLoader.js +54 -6
- package/lib/esm/internal/tile/RealityTileLoader.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts +2 -1
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.js +2 -1
- package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js +1 -1
- package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js.map +1 -1
- package/lib/esm/properties/AngleDescription.d.ts +2 -1
- package/lib/esm/properties/AngleDescription.d.ts.map +1 -1
- package/lib/esm/properties/AngleDescription.js +4 -1
- package/lib/esm/properties/AngleDescription.js.map +1 -1
- package/lib/esm/properties/FormattedQuantityDescription.d.ts +29 -1
- package/lib/esm/properties/FormattedQuantityDescription.d.ts.map +1 -1
- package/lib/esm/properties/FormattedQuantityDescription.js +35 -1
- package/lib/esm/properties/FormattedQuantityDescription.js.map +1 -1
- package/lib/esm/properties/LengthDescription.d.ts +6 -3
- package/lib/esm/properties/LengthDescription.d.ts.map +1 -1
- package/lib/esm/properties/LengthDescription.js +12 -3
- package/lib/esm/properties/LengthDescription.js.map +1 -1
- package/lib/esm/render/Decorations.d.ts +1 -1
- package/lib/esm/render/Decorations.d.ts.map +1 -1
- package/lib/esm/render/Decorations.js +1 -1
- package/lib/esm/render/Decorations.js.map +1 -1
- package/lib/esm/render/GraphicBranch.d.ts +1 -1
- package/lib/esm/render/GraphicBranch.d.ts.map +1 -1
- package/lib/esm/render/GraphicBranch.js +1 -1
- package/lib/esm/render/GraphicBranch.js.map +1 -1
- package/lib/esm/render/RenderSystem.d.ts +2 -2
- package/lib/esm/render/RenderSystem.d.ts.map +1 -1
- package/lib/esm/render/RenderSystem.js +1 -1
- package/lib/esm/render/RenderSystem.js.map +1 -1
- package/lib/esm/render/ScreenSpaceEffectBuilder.d.ts +1 -1
- package/lib/esm/render/ScreenSpaceEffectBuilder.js.map +1 -1
- package/lib/esm/request/Request.d.ts +2 -2
- package/lib/esm/request/Request.js.map +1 -1
- package/lib/esm/tile/RealityTile.d.ts +5 -0
- package/lib/esm/tile/RealityTile.d.ts.map +1 -1
- package/lib/esm/tile/RealityTile.js +4 -0
- package/lib/esm/tile/RealityTile.js.map +1 -1
- package/lib/esm/tile/Tile.d.ts +1 -1
- package/lib/esm/tile/Tile.d.ts.map +1 -1
- package/lib/esm/tile/Tile.js +1 -1
- package/lib/esm/tile/Tile.js.map +1 -1
- package/lib/esm/tile/TileAdmin.d.ts +23 -1
- package/lib/esm/tile/TileAdmin.d.ts.map +1 -1
- package/lib/esm/tile/TileAdmin.js +17 -1
- package/lib/esm/tile/TileAdmin.js.map +1 -1
- package/lib/esm/tile/TileTree.d.ts +1 -1
- package/lib/esm/tile/TileTree.d.ts.map +1 -1
- package/lib/esm/tile/TileTree.js +1 -1
- package/lib/esm/tile/TileTree.js.map +1 -1
- package/lib/esm/tile/TileTreeReference.d.ts +1 -1
- package/lib/esm/tile/TileTreeReference.d.ts.map +1 -1
- package/lib/esm/tile/TileTreeReference.js +1 -1
- package/lib/esm/tile/TileTreeReference.js.map +1 -1
- package/lib/esm/tile/map/BingElevation.d.ts +16 -4
- package/lib/esm/tile/map/BingElevation.d.ts.map +1 -1
- package/lib/esm/tile/map/BingElevation.js +18 -8
- package/lib/esm/tile/map/BingElevation.js.map +1 -1
- package/lib/esm/tile/map/CesiumTerrainProvider.d.ts +16 -1
- package/lib/esm/tile/map/CesiumTerrainProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/CesiumTerrainProvider.js +56 -18
- package/lib/esm/tile/map/CesiumTerrainProvider.js.map +1 -1
- package/lib/esm/tile/map/ImageryTileTree.d.ts +2 -2
- package/lib/esm/tile/map/ImageryTileTree.d.ts.map +1 -1
- package/lib/esm/tile/map/ImageryTileTree.js +2 -2
- package/lib/esm/tile/map/ImageryTileTree.js.map +1 -1
- package/lib/esm/tile/map/MapLayerFormatRegistry.d.ts +6 -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/MapLayerImageryFormats.d.ts +1 -0
- package/lib/esm/tile/map/MapLayerImageryFormats.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryFormats.js +3 -0
- package/lib/esm/tile/map/MapLayerImageryFormats.js.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.js +1 -1
- package/lib/esm/tile/map/MapLayerImageryProvider.js.map +1 -1
- package/lib/esm/tile/map/MapTileTree.d.ts +1 -1
- package/lib/esm/tile/map/MapTileTree.d.ts.map +1 -1
- package/lib/esm/tile/map/MapTileTree.js +21 -10
- package/lib/esm/tile/map/MapTileTree.js.map +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.d.ts +7 -1
- package/lib/esm/tile/map/TerrainMeshProvider.d.ts.map +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.js +1 -1
- package/lib/esm/tile/map/TerrainMeshProvider.js.map +1 -1
- package/lib/esm/tools/AccuDrawShortcutTool.d.ts +29 -0
- package/lib/esm/tools/AccuDrawShortcutTool.d.ts.map +1 -0
- package/lib/esm/tools/AccuDrawShortcutTool.js +134 -0
- package/lib/esm/tools/AccuDrawShortcutTool.js.map +1 -0
- package/lib/esm/tools/AccuDrawTool.d.ts +13 -68
- package/lib/esm/tools/AccuDrawTool.d.ts.map +1 -1
- package/lib/esm/tools/AccuDrawTool.js +102 -128
- package/lib/esm/tools/AccuDrawTool.js.map +1 -1
- package/lib/esm/tools/SetupCameraTools.d.ts +89 -0
- package/lib/esm/tools/SetupCameraTools.d.ts.map +1 -0
- package/lib/esm/tools/SetupCameraTools.js +439 -0
- package/lib/esm/tools/SetupCameraTools.js.map +1 -0
- package/lib/esm/tools/ToolAdmin.d.ts +5 -2
- package/lib/esm/tools/ToolAdmin.d.ts.map +1 -1
- package/lib/esm/tools/ToolAdmin.js +30 -7
- package/lib/esm/tools/ToolAdmin.js.map +1 -1
- package/lib/esm/tools/ViewTool.d.ts +1 -81
- package/lib/esm/tools/ViewTool.d.ts.map +1 -1
- package/lib/esm/tools/ViewTool.js +14 -409
- package/lib/esm/tools/ViewTool.js.map +1 -1
- package/lib/public/locales/en/iModelJs.json +2 -1
- package/lib/public/scripts/parse-imdl-worker.js +1 -1
- package/lib/workers/webpack/parse-imdl-worker.js +1 -1
- package/package.json +24 -23
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubCategoriesCache.js","sourceRoot":"","sources":["../../src/SubCategoriesCache.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,sDAAyH;AACzH,oDAAiF;AAkBjF,MAAM,sBAAsB,GAAG,IAAI,GAAG,EAAU,CAAC;AAEjD;;GAEG;AACH,MAAa,kBAAkB;IACZ,aAAa,GAAG,IAAI,GAAG,EAAmB,CAAC;IAC3C,YAAY,GAAG,IAAI,GAAG,EAAiC,CAAC;IACxD,OAAO,CAAmB;IACnC,uBAAuB,CAAsB;IAErD,YAAmB,MAAwB;QACzC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAEM,iBAAiB,CAAC,MAAwB;QAC/C,gHAAgH;QAChH,4BAA4B;QAC5B,IAAA,qBAAM,EAAC,MAAM,KAAK,IAAI,CAAC,OAAO,CAAC,CAAC;QAChC,IAAA,qBAAM,EAAC,MAAM,CAAC,qBAAqB,EAAE,CAAC,CAAC;QACvC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,EAAE;YACpD,MAAM,qBAAqB,GAAG,IAAI,GAAG,EAAU,CAAC;YAChD,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;gBAC7B,IAAI,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,kBAAkB,CAAC,EAAE,CAAC;oBAC3C,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE,CA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mGAAmG;gBACnG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC5B,KAAK,MAAM,UAAU,IAAI,mBAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;oBACjD,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAC3C,CAAC;QACH,CAAC;KACF;IAvGY,wBAAK,QAuGjB,CAAA;AACH,CAAC,EAjLgB,kBAAkB,kCAAlB,kBAAkB,QAiLlC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { assert, CompressedId64Set, Id64, Id64Arg, Id64Set, Id64String, OrderedId64Iterable } from \"@itwin/core-bentley\";\nimport { SubCategoryAppearance, SubCategoryResultRow } from \"@itwin/core-common\";\nimport { IModelConnection } from \"./IModelConnection\";\n\n/** A cancelable paginated request for subcategory information.\n * @see SubCategoriesCache\n * @internal\n */\nexport interface SubCategoriesRequest {\n /** The Ids of any categories which were requested but were not yet loaded. */\n readonly missingCategoryIds: Id64Set;\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.\n * Categories may fail to load if the request is explicitly canceled or if the IModelConnection is closed before all categories are loaded.\n */\n readonly promise: Promise<boolean>;\n /** Cancels the request. */\n cancel(): void;\n}\n\nconst invalidCategoryIdEntry = new Set<string>();\n\n/** A cache of information about the subcategories contained within an [[IModelConnection]]. It is populated on demand.\n * @internal\n */\nexport class SubCategoriesCache {\n private readonly _byCategoryId = new Map<string, Id64Set>();\n private readonly _appearances = new Map<string, SubCategoryAppearance>();\n private readonly _imodel: IModelConnection;\n private _missingAtTimeOfPreload: Id64Set | undefined;\n\n public constructor(imodel: IModelConnection) {\n this._imodel = imodel;\n }\n\n public attachToBriefcase(imodel: IModelConnection): void {\n // We want to do this in the constructor but can't, because IModelConnection.subcategories is initialized before\n // BriefcaseConnection.txns.\n assert(imodel === this._imodel);\n assert(imodel.isBriefcaseConnection());\n imodel.txns.onElementsChanged.addListener((changes) => {\n const affectedSubCategories = new Set<string>();\n for (const change of changes) {\n if (change.metadata.is(\"BisCore:Category\")) {\n if (change.type === \"deleted\") {\n this._byCategoryId.delete(change.id);\n }\n } else if (change.metadata.is(\"BisCore:SubCategory\")) {\n if (change.type === \"inserted\") {\n // We don't know to which category the subcategory belongs. Blow away the entire cache.\n this._byCategoryId.clear();\n this._appearances.clear();\n return;\n }\n\n this._appearances.delete(change.id);\n affectedSubCategories.add(change.id);\n }\n }\n\n if (affectedSubCategories.size > 0) {\n for (const [catId, subCatIds] of this._byCategoryId) {\n for (const subCatId of affectedSubCategories) {\n if (subCatIds.has(subCatId)) {\n this._byCategoryId.delete(catId);\n affectedSubCategories.delete(subCatId);\n break;\n }\n }\n }\n }\n });\n }\n /** Get the Ids of all subcategories belonging to the category with the specified Id, or undefined if no such information is present. */\n public getSubCategories(categoryId: string): Id64Set | undefined { return this._byCategoryId.get(categoryId); }\n\n /** Get the base appearance of the subcategory with the specified Id, or undefined if no such information is present. */\n public getSubCategoryAppearance(subCategoryId: Id64String): SubCategoryAppearance | undefined { return this._appearances.get(subCategoryId.toString()); }\n\n /** Request that the subcategory information for all of the specified categories is loaded.\n * If all such information has already been loaded, returns undefined.\n * Otherwise, dispatches an asynchronous request to load those categories which are not already loaded and returns a cancellable request object\n * containing the corresponding promise and the set of categories still to be loaded.\n */\n public load(categoryIds: Id64Arg): SubCategoriesRequest | undefined {\n const missing = this.getMissing(categoryIds);\n if (undefined === missing)\n return undefined;\n\n const request = new SubCategoriesCache.Request(missing, this._imodel);\n const promise = request.dispatch().then((result?: SubCategoriesCache.Result) => {\n if (undefined !== result)\n this.processResults(result, missing);\n\n return !request.wasCanceled;\n });\n return {\n missingCategoryIds: missing,\n promise,\n cancel: () => request.cancel(),\n };\n }\n\n /** Load all subcategories that come from used spatial categories of the iModel into the cache. */\n public async loadAllUsedSpatialSubCategories(): Promise<void> {\n try {\n const results = await this._imodel.queryAllUsedSpatialSubCategories();\n if (undefined !== results) {\n this.processResults(results, new Set<string>(), false);\n }\n } catch {\n // In case of a truncated response, gracefully handle the error and exit.\n }\n\n }\n /** Given categoryIds, return which of these are not cached. */\n private getMissing(categoryIds: Id64Arg): Id64Set | undefined {\n let missing: Id64Set | undefined;\n for (const catId of Id64.iterable(categoryIds)) {\n if (undefined === this._byCategoryId.get(catId)) {\n if (undefined === missing)\n missing = new Set<string>();\n\n missing.add(catId);\n }\n }\n\n return missing;\n }\n\n public clear(): void {\n this._byCategoryId.clear();\n this._appearances.clear();\n }\n\n public onIModelConnectionClose(): void {\n this.clear();\n }\n\n private static createSubCategoryAppearance(json?: any) {\n let props: SubCategoryAppearance.Props | undefined;\n if (\"string\" === typeof json && 0 < json.length)\n props = JSON.parse(json);\n\n return new SubCategoryAppearance(props);\n }\n\n private processResults(result: SubCategoriesCache.Result, missing: Id64Set, override: boolean = true): void {\n for (const row of result) {\n this.add(row.parentId, row.id, SubCategoriesCache.createSubCategoryAppearance(row.appearance), override);\n }\n\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\n for (const id of missing)\n if (undefined === this._byCategoryId.get(id))\n this._byCategoryId.set(id, invalidCategoryIdEntry);\n }\n\n /** Exposed strictly for tests.\n * @internal\n */\n public add(categoryId: string, subCategoryId: string, appearance: SubCategoryAppearance, override: boolean) {\n let set = this._byCategoryId.get(categoryId);\n if (undefined === set)\n this._byCategoryId.set(categoryId, set = new Set<string>());\n\n set.add(subCategoryId);\n if (override || !this._appearances.has(subCategoryId))\n this._appearances.set(subCategoryId, appearance);\n }\n\n public async getCategoryInfo(inputCategoryIds: Id64String | Iterable<Id64String>): Promise<Map<Id64String, IModelConnection.Categories.CategoryInfo>> {\n // Eliminate duplicates...\n const categoryIds = new Set<string>(typeof inputCategoryIds === \"string\" ? [inputCategoryIds] : inputCategoryIds);\n const req = this.load(categoryIds);\n if (req)\n await req.promise;\n\n const map = new Map<Id64String, IModelConnection.Categories.CategoryInfo>();\n for (const categoryId of categoryIds) {\n const subCategoryIds = this._byCategoryId.get(categoryId);\n if (!subCategoryIds)\n continue;\n\n const subCategories = this.mapSubCategoryInfos(categoryId, subCategoryIds);\n map.set(categoryId, { id: categoryId, subCategories });\n }\n\n return map;\n }\n\n public async getSubCategoryInfo(categoryId: Id64String, inputSubCategoryIds: Id64String | Iterable<Id64String>): Promise<Map<Id64String, IModelConnection.Categories.SubCategoryInfo>> {\n // Eliminate duplicates...\n const subCategoryIds = new Set<string>(typeof inputSubCategoryIds === \"string\" ? [inputSubCategoryIds] : inputSubCategoryIds);\n const req = this.load(categoryId);\n if (req)\n await req.promise;\n\n return this.mapSubCategoryInfos(categoryId, subCategoryIds);\n }\n\n private mapSubCategoryInfos(categoryId: Id64String, subCategoryIds: Set<Id64String>): Map<Id64String, IModelConnection.Categories.SubCategoryInfo> {\n const map = new Map<Id64String, IModelConnection.Categories.SubCategoryInfo>();\n for (const id of subCategoryIds) {\n const appearance = this._appearances.get(id);\n if (appearance)\n map.set(id, { id, categoryId, appearance });\n }\n\n return map;\n }\n}\n\n/** This namespace and the types within it are exported strictly for use in tests.\n * @internal\n */\nexport namespace SubCategoriesCache {\n export type Result = SubCategoryResultRow[];\n\n export class Request {\n private readonly _imodel: IModelConnection;\n private readonly _categoryIds: CompressedId64Set[] = [];\n private readonly _result: Result = [];\n private _canceled = false;\n private _curCategoryIdsIndex = 0;\n\n public get wasCanceled() { return this._canceled || this._imodel.isClosed; }\n\n public constructor(categoryIds: Set<string>, imodel: IModelConnection, maxCategoriesPerQuery = 2500) {\n this._imodel = imodel;\n\n const catIds = [...categoryIds];\n OrderedId64Iterable.sortArray(catIds); // sort categories, so that given the same set of categoryIds we will always create the same batches.\n while (catIds.length !== 0) {\n const end = (catIds.length > maxCategoriesPerQuery) ? maxCategoriesPerQuery : catIds.length;\n const compressedIds = CompressedId64Set.compressArray(catIds.splice(0, end));\n this._categoryIds.push(compressedIds);\n }\n }\n\n public cancel() { this._canceled = true; }\n\n public async dispatch(): Promise<Result | undefined> {\n if (this.wasCanceled || this._curCategoryIdsIndex >= this._categoryIds.length) // handle case of empty category Id set...\n return undefined;\n\n try {\n const catIds = this._categoryIds[this._curCategoryIdsIndex];\n const result = await this._imodel.querySubCategories(catIds);\n this._result.push(...result);\n if (this.wasCanceled)\n return undefined;\n } catch {\n // ###TODO: detect cases in which retry is warranted\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\n // incomplete results. Since we're not retrying, that's the best we can do.\n }\n\n // Finished with current batch of categoryIds. Dispatch the next batch if one exists.\n if (++this._curCategoryIdsIndex < this._categoryIds.length) {\n if (this.wasCanceled)\n return undefined;\n else\n return this.dispatch();\n }\n\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.\n return this._result;\n }\n }\n\n export type QueueFunc = (anySubCategoriesLoaded: boolean) => void;\n\n export class QueueEntry {\n public readonly categoryIds: Id64Set;\n public readonly funcs: QueueFunc[];\n\n public constructor(categoryIds: Id64Set, func: QueueFunc) {\n this.categoryIds = categoryIds;\n this.funcs = [func];\n }\n }\n\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\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\n * opportunity to reduce the number of backend requests by batching consecutive requests.\n * Chiefly used by [[Viewport]].\n * @internal\n */\n export class Queue {\n /* NB: Members marked protected for use in tests only. */\n protected _current?: QueueEntry;\n protected _next?: QueueEntry;\n protected _request?: SubCategoriesRequest;\n protected _disposed = false;\n\n /** Push a request onto the queue. The requested categories will be loaded if necessary, and then\n * the supplied function will be invoked. Any previously-pushed requests are guaranteed to be processed before this one.\n */\n public push(cache: SubCategoriesCache, categoryIds: Id64Arg, func: QueueFunc): void {\n if (this._disposed)\n return;\n else if (undefined === this._current)\n this.pushCurrent(cache, categoryIds, func);\n else\n this.pushNext(categoryIds, func);\n }\n\n /** Cancel all requests and empty the queue. */\n public [Symbol.dispose](): void {\n if (undefined !== this._request) {\n assert(undefined !== this._current);\n this._request.cancel();\n this._request = undefined;\n }\n\n this._current = this._next = undefined;\n this._disposed = true;\n }\n\n public get isEmpty(): boolean {\n return undefined === this._current && undefined === this._next;\n }\n\n private pushCurrent(cache: SubCategoriesCache, categoryIds: Id64Arg, func: QueueFunc): void {\n assert(undefined === this._next);\n assert(undefined === this._current);\n assert(undefined === this._request);\n\n this._request = cache.load(categoryIds);\n if (undefined === this._request) {\n // All requested categories are already loaded.\n func(false);\n return;\n } else {\n // We need to load the requested categories before invoking the function.\n this.processCurrent(cache, new QueueEntry(Id64.toIdSet(categoryIds, true), func));\n }\n }\n\n private processCurrent(cache: SubCategoriesCache, entry: QueueEntry): void {\n assert(undefined !== this._request);\n assert(undefined === this._current);\n assert(undefined === this._next);\n\n this._current = entry;\n this._request.promise.then((completed: boolean) => { // eslint-disable-line @typescript-eslint/no-floating-promises\n if (this._disposed)\n return;\n\n // Invoke all the functions which were awaiting this set of IModelConnection.Categories.\n assert(undefined !== this._current);\n if (completed)\n for (const func of this._current.funcs)\n func(true);\n\n this._request = undefined;\n this._current = undefined;\n\n // If we have more requests, process them.\n const next = this._next;\n this._next = undefined;\n if (undefined !== next) {\n this._request = cache.load(next.categoryIds);\n if (undefined === this._request) {\n // All categories loaded.\n for (const func of next.funcs)\n func(true);\n } else {\n // We need to load the requested categories before invoking the pending functions.\n this.processCurrent(cache, next);\n }\n }\n });\n }\n\n private pushNext(categoryIds: Id64Arg, func: QueueFunc): void {\n assert(undefined !== this._current);\n assert(undefined !== this._request);\n\n if (undefined === this._next) {\n // We have a request currently in process and none pending.\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.\n // But we will find that out (synchronously) when current request completes, unless more requests come in. Probably not worth it.\n this._next = new QueueEntry(Id64.toIdSet(categoryIds, true), func);\n } else {\n // We have a request currently in process, and one or more pending. Append this one to the pending.\n this._next.funcs.push(func);\n for (const categoryId of Id64.iterable(categoryIds))\n this._next.categoryIds.add(categoryId);\n }\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SubCategoriesCache.js","sourceRoot":"","sources":["../../src/SubCategoriesCache.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,sDAAkI;AAClI,oDAAiF;AAkBjF;;GAEG;AACH,MAAa,kBAAkB;IACZ,aAAa,GAAG,IAAI,GAAG,EAAmB,CAAC;IAC3C,YAAY,GAAG,IAAI,GAAG,EAAiC,CAAC;IACxD,iBAAiB,GAAG,IAAI,GAAG,EAAU,CAAC;IACtC,OAAO,CAAmB;IACnC,uBAAuB,GAAG,CAAC,CAAC;IAEnB,UAAU,GAAG,IAAI,sBAAO,EAAc,CAAC;IAExD,YAAmB,MAAwB;QACzC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAEM,iBAAiB,CAAC,MAAwB;QAC/C,gHAAgH;QAChH,4BAA4B;QAC5B,IAAA,qBAAM,EAAC,MAAM,KAAK,IAAI,CAAC,OAAO,CAAC,CAAC;QAChC,IAAA,qBAAM,EAAC,MAAM,CAAC,qBAAqB,EAAE,CAAC,CAAC;QACvC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,EAAE;YACpD,MAAM,qBAAqB,GAAG,IAAI,GAAG,EAAU,CAAC;YAChD,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAU,CAAC;YAC7C,IAAI,uBAAuB,GAAG,KAAK,CAAC;YACpC,IAAI,OAAO,GAAG,KAAK,CAAC;YACpB,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;gBAC7B,IAAI,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,kBAAkB,CAAC,EAAE,CAAC;oBAC3C,IAAI,M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AE,IAAI,CAAC,CAAC;oBACnC,CAAC;gBACH,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;QAEO,QAAQ,CAAC,WAAoB,EAAE,IAAe;YACpD,IAAA,qBAAM,EAAC,SAAS,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC;YACpC,IAAA,qBAAM,EAAC,SAAS,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC;YAEpC,IAAI,SAAS,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC;gBAC7B,2DAA2D;gBAC3D,sJAAsJ;gBACtJ,iIAAiI;gBACjI,IAAI,CAAC,KAAK,GAAG,IAAI,UAAU,CAAC,mBAAI,CAAC,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;YACrE,CAAC;iBAAM,CAAC;gBACN,mGAAmG;gBACnG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC5B,KAAK,MAAM,UAAU,IAAI,mBAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;oBACjD,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAC3C,CAAC;QACH,CAAC;KACF;IAvGY,wBAAK,QAuGjB,CAAA;AACH,CAAC,EA/KgB,kBAAkB,kCAAlB,kBAAkB,QA+KlC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { assert, BeEvent, CompressedId64Set, Id64, Id64Arg, Id64Set, Id64String, OrderedId64Iterable } from \"@itwin/core-bentley\";\nimport { SubCategoryAppearance, SubCategoryResultRow } from \"@itwin/core-common\";\nimport type { IModelConnection } from \"./IModelConnection\";\n\n/** A cancelable paginated request for subcategory information.\n * @see SubCategoriesCache\n * @internal\n */\nexport interface SubCategoriesRequest {\n /** The Ids of any categories which were requested but were not yet loaded. */\n readonly missingCategoryIds: Id64Set;\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.\n * Categories may fail to load if the request is explicitly canceled, if the IModelConnection is closed before all categories are loaded, or if the query fails.\n */\n readonly promise: Promise<boolean>;\n /** Cancels the request. */\n cancel(): void;\n}\n\n/** A cache of information about the subcategories contained within an [[IModelConnection]]. It is populated on demand.\n * @internal\n */\nexport class SubCategoriesCache {\n private readonly _byCategoryId = new Map<string, Id64Set>();\n private readonly _appearances = new Map<string, SubCategoryAppearance>();\n private readonly _staleCategoryIds = new Set<string>();\n private readonly _imodel: IModelConnection;\n private _invalidationGeneration = 0;\n\n private readonly _onChanged = new BeEvent<() => void>();\n\n public constructor(imodel: IModelConnection) {\n this._imodel = imodel;\n }\n\n public attachToBriefcase(imodel: IModelConnection): void {\n // We want to do this in the constructor but can't, because IModelConnection.subcategories is initialized before\n // BriefcaseConnection.txns.\n assert(imodel === this._imodel);\n assert(imodel.isBriefcaseConnection());\n imodel.txns.onElementsChanged.addListener((changes) => {\n const affectedSubCategories = new Set<string>();\n const affectedCategories = new Set<string>();\n let invalidateAllCategories = false;\n let changed = false;\n for (const change of changes) {\n if (change.metadata.is(\"BisCore:Category\")) {\n if (change.type === \"deleted\") {\n this.deleteCategory(change.id);\n changed = true;\n }\n } else if (change.metadata.is(\"BisCore:SubCategory\")) {\n if (change.type === \"inserted\") {\n // We don't know to which category the subcategory belongs, so every cached category may be stale.\n invalidateAllCategories = true;\n changed = true;\n continue;\n }\n\n affectedSubCategories.add(change.id);\n }\n }\n\n if (invalidateAllCategories) {\n this.markAllCategoriesStale();\n } else if (affectedSubCategories.size > 0) {\n for (const [catId, subCatIds] of this._byCategoryId) {\n for (const subCatId of affectedSubCategories) {\n if (subCatIds.has(subCatId)) {\n affectedCategories.add(catId);\n changed = true;\n affectedSubCategories.delete(subCatId);\n break;\n }\n }\n }\n\n if (affectedCategories.size > 0)\n this.markCategoriesStale(affectedCategories);\n\n // If any affected subcategories were NOT found in cache and categories are currently stale,\n // bump generation to invalidate in-flight reload queries that may return stale data.\n if (affectedSubCategories.size > 0 && this.hasStaleCategories()) {\n changed = true;\n }\n }\n\n if (changed) {\n this._invalidationGeneration++;\n this._onChanged.raiseEvent();\n }\n });\n }\n /** Register a listener to be notified when transaction changes invalidate cached subcategory information.\n * @internal\n */\n public addChangedListener(listener: () => void): () => void { return this._onChanged.addListener(listener); }\n\n /** Get the Ids of all subcategories belonging to the category with the specified Id, or undefined if no such information is present. */\n public getSubCategories(categoryId: string): Id64Set | undefined { return this._byCategoryId.get(categoryId); }\n\n /** Get the base appearance of the subcategory with the specified Id, or undefined if no such information is present. */\n public getSubCategoryAppearance(subCategoryId: Id64String): SubCategoryAppearance | undefined { return this._appearances.get(subCategoryId.toString()); }\n\n /** Request that the subcategory information for all of the specified categories is loaded.\n * If all such information has already been loaded, returns undefined.\n * Otherwise, dispatches an asynchronous request to load those categories which are not already loaded and returns a cancellable request object\n * containing the corresponding promise and the set of categories still to be loaded.\n */\n public load(categoryIds: Id64Arg): SubCategoriesRequest | undefined {\n const missing = this.getMissing(categoryIds);\n if (undefined === missing)\n return undefined;\n\n const request = new SubCategoriesCache.Request(missing, this._imodel);\n const generation = this._invalidationGeneration;\n const promise = request.dispatch().then((result?: SubCategoriesCache.Result) => {\n const completed = undefined !== result && !request.wasCanceled && generation === this._invalidationGeneration;\n if (completed)\n this.processResults(result, missing);\n\n // On failure (result undefined due to query error), do NOT cache empty sets for uncached categories.\n // Leave them absent so getMissing() will include them in subsequent load() retries.\n return completed;\n });\n return {\n missingCategoryIds: missing,\n promise,\n cancel: () => request.cancel(),\n };\n }\n\n /** Load all subcategories that come from used spatial categories of the iModel into the cache. */\n public async loadAllUsedSpatialSubCategories(): Promise<void> {\n try {\n const generation = this._invalidationGeneration;\n const results = await this._imodel.queryAllUsedSpatialSubCategories();\n if (generation === this._invalidationGeneration && undefined !== results) {\n const staleCategories = new Set(this._staleCategoryIds);\n // This preload can return partial results on very large iModels, so keep stale categories additive and\n // preserve their stale state until a targeted reload can fully reconcile them.\n for (const row of results)\n this.add(row.parentId, row.id, SubCategoriesCache.createSubCategoryAppearance(row.appearance), staleCategories.has(row.parentId));\n\n if (staleCategories.size > 0)\n this.markCategoriesStale(staleCategories);\n }\n } catch {\n // In case of a truncated response, gracefully handle the error and exit.\n }\n\n }\n /** Given categoryIds, return which of these are not cached. */\n private getMissing(categoryIds: Id64Arg): Id64Set | undefined {\n let missing: Id64Set | undefined;\n for (const catId of Id64.iterable(categoryIds)) {\n if (undefined === this._byCategoryId.get(catId) || this.isCategoryStale(catId)) {\n if (undefined === missing)\n missing = new Set<string>();\n\n missing.add(catId);\n }\n }\n\n return missing;\n }\n\n public clear(): void {\n this._byCategoryId.clear();\n this._appearances.clear();\n this._staleCategoryIds.clear();\n this._invalidationGeneration++;\n }\n\n public onIModelConnectionClose(): void {\n this.clear();\n }\n\n private static createSubCategoryAppearance(json?: any) {\n let props: SubCategoryAppearance.Props | undefined;\n if (\"string\" === typeof json && 0 < json.length)\n props = JSON.parse(json);\n\n return new SubCategoryAppearance(props);\n }\n\n private processResults(result: SubCategoriesCache.Result, refreshedCategoryIds: Id64Set, override: boolean = true): void {\n const previousSubCategoryIds = new Map<Id64String, Id64Set>();\n for (const id of refreshedCategoryIds) {\n const previous = this._byCategoryId.get(id);\n if (undefined !== previous)\n previousSubCategoryIds.set(id, previous);\n\n this._byCategoryId.set(id, new Set<string>());\n this.markCategoryFresh(id);\n }\n\n for (const row of result) {\n this.add(row.parentId, row.id, SubCategoriesCache.createSubCategoryAppearance(row.appearance), override);\n }\n\n for (const [categoryId, previous] of previousSubCategoryIds) {\n const current = this._byCategoryId.get(categoryId);\n for (const subCategoryId of previous) {\n if (!current?.has(subCategoryId))\n this._appearances.delete(subCategoryId);\n }\n }\n }\n\n /** Exposed strictly for tests.\n * @internal\n */\n public add(categoryId: string, subCategoryId: string, appearance: SubCategoryAppearance, override: boolean) {\n let set = this._byCategoryId.get(categoryId);\n if (undefined === set)\n this._byCategoryId.set(categoryId, set = new Set<string>());\n\n set.add(subCategoryId);\n this.markCategoryFresh(categoryId);\n if (override || !this._appearances.has(subCategoryId))\n this._appearances.set(subCategoryId, appearance);\n }\n\n private isCategoryStale(categoryId: Id64String): boolean {\n return this._staleCategoryIds.has(categoryId);\n }\n\n private markCategoryFresh(categoryId: Id64String): void {\n this._staleCategoryIds.delete(categoryId);\n }\n\n private markAllCategoriesStale(): void {\n // We don't know which cached category the inserted subcategory belongs to, so every currently-cached\n // category may now be missing a subcategory. Mark them all stale so they are re-requested on next load.\n // Categories cached after this point are loaded fresh and are intentionally left out.\n for (const categoryId of this._byCategoryId.keys())\n this._staleCategoryIds.add(categoryId);\n }\n\n private markCategoriesStale(categoryIds: Iterable<Id64String>): void {\n for (const categoryId of categoryIds)\n this._staleCategoryIds.add(categoryId);\n }\n\n private hasStaleCategories(): boolean {\n return this._staleCategoryIds.size > 0;\n }\n\n private deleteCategory(categoryId: Id64String): void {\n const subCategoryIds = this._byCategoryId.get(categoryId);\n if (undefined !== subCategoryIds)\n for (const subCategoryId of subCategoryIds)\n this._appearances.delete(subCategoryId);\n\n this._byCategoryId.delete(categoryId);\n this._staleCategoryIds.delete(categoryId);\n }\n\n public async getCategoryInfo(inputCategoryIds: Id64String | Iterable<Id64String>): Promise<Map<Id64String, IModelConnection.Categories.CategoryInfo>> {\n // Eliminate duplicates...\n const categoryIds = new Set<string>(typeof inputCategoryIds === \"string\" ? [inputCategoryIds] : inputCategoryIds);\n const req = this.load(categoryIds);\n if (req)\n await req.promise;\n\n const map = new Map<Id64String, IModelConnection.Categories.CategoryInfo>();\n for (const categoryId of categoryIds) {\n const subCategoryIds = this._byCategoryId.get(categoryId);\n const subCategories = undefined !== subCategoryIds ? this.mapSubCategoryInfos(categoryId, subCategoryIds) : new Map<Id64String, IModelConnection.Categories.SubCategoryInfo>();\n map.set(categoryId, { id: categoryId, subCategories });\n }\n\n return map;\n }\n\n public async getSubCategoryInfo(categoryId: Id64String, inputSubCategoryIds: Id64String | Iterable<Id64String>): Promise<Map<Id64String, IModelConnection.Categories.SubCategoryInfo>> {\n // Eliminate duplicates...\n const subCategoryIds = new Set<string>(typeof inputSubCategoryIds === \"string\" ? [inputSubCategoryIds] : inputSubCategoryIds);\n const req = this.load(categoryId);\n if (req)\n await req.promise;\n\n return this.mapSubCategoryInfos(categoryId, subCategoryIds);\n }\n\n private mapSubCategoryInfos(categoryId: Id64String, subCategoryIds: Set<Id64String>): Map<Id64String, IModelConnection.Categories.SubCategoryInfo> {\n const map = new Map<Id64String, IModelConnection.Categories.SubCategoryInfo>();\n for (const id of subCategoryIds) {\n const appearance = this._appearances.get(id);\n if (appearance)\n map.set(id, { id, categoryId, appearance });\n }\n\n return map;\n }\n}\n\n/** This namespace and the types within it are exported strictly for use in tests.\n * @internal\n */\nexport namespace SubCategoriesCache {\n export type Result = SubCategoryResultRow[];\n\n export class Request {\n private readonly _imodel: IModelConnection;\n private readonly _categoryIds: CompressedId64Set[] = [];\n private readonly _result: Result = [];\n private _canceled = false;\n private _curCategoryIdsIndex = 0;\n\n public get wasCanceled() { return this._canceled || this._imodel.isClosed; }\n\n public constructor(categoryIds: Set<string>, imodel: IModelConnection, maxCategoriesPerQuery = 2500) {\n this._imodel = imodel;\n\n const catIds = [...categoryIds];\n OrderedId64Iterable.sortArray(catIds); // sort categories, so that given the same set of categoryIds we will always create the same batches.\n while (catIds.length !== 0) {\n const end = (catIds.length > maxCategoriesPerQuery) ? maxCategoriesPerQuery : catIds.length;\n const compressedIds = CompressedId64Set.compressArray(catIds.splice(0, end));\n this._categoryIds.push(compressedIds);\n }\n }\n\n public cancel() { this._canceled = true; }\n\n public async dispatch(): Promise<Result | undefined> {\n if (this.wasCanceled || this._curCategoryIdsIndex >= this._categoryIds.length) // handle case of empty category Id set...\n return undefined;\n\n try {\n const catIds = this._categoryIds[this._curCategoryIdsIndex];\n const result = await this._imodel.querySubCategories(catIds);\n this._result.push(...result);\n if (this.wasCanceled)\n return undefined;\n } catch {\n return undefined;\n }\n\n // Finished with current batch of categoryIds. Dispatch the next batch if one exists.\n if (++this._curCategoryIdsIndex < this._categoryIds.length) {\n if (this.wasCanceled)\n return undefined;\n else\n return this.dispatch();\n }\n\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.\n return this._result;\n }\n }\n\n export type QueueFunc = (anySubCategoriesLoaded: boolean) => void;\n\n export class QueueEntry {\n public readonly categoryIds: Id64Set;\n public readonly funcs: QueueFunc[];\n\n public constructor(categoryIds: Id64Set, func: QueueFunc) {\n this.categoryIds = categoryIds;\n this.funcs = [func];\n }\n }\n\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\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\n * opportunity to reduce the number of backend requests by batching consecutive requests.\n * Chiefly used by [[Viewport]].\n * @internal\n */\n export class Queue {\n /* NB: Members marked protected for use in tests only. */\n protected _current?: QueueEntry;\n protected _next?: QueueEntry;\n protected _request?: SubCategoriesRequest;\n protected _disposed = false;\n\n /** Push a request onto the queue. The requested categories will be loaded if necessary, and then\n * the supplied function will be invoked. Any previously-pushed requests are guaranteed to be processed before this one.\n */\n public push(cache: SubCategoriesCache, categoryIds: Id64Arg, func: QueueFunc): void {\n if (this._disposed)\n return;\n else if (undefined === this._current)\n this.pushCurrent(cache, categoryIds, func);\n else\n this.pushNext(categoryIds, func);\n }\n\n /** Cancel all requests and empty the queue. */\n public [Symbol.dispose](): void {\n if (undefined !== this._request) {\n assert(undefined !== this._current);\n this._request.cancel();\n this._request = undefined;\n }\n\n this._current = this._next = undefined;\n this._disposed = true;\n }\n\n public get isEmpty(): boolean {\n return undefined === this._current && undefined === this._next;\n }\n\n private pushCurrent(cache: SubCategoriesCache, categoryIds: Id64Arg, func: QueueFunc): void {\n assert(undefined === this._next);\n assert(undefined === this._current);\n assert(undefined === this._request);\n\n this._request = cache.load(categoryIds);\n if (undefined === this._request) {\n // All requested categories are already loaded.\n func(false);\n return;\n } else {\n // We need to load the requested categories before invoking the function.\n this.processCurrent(cache, new QueueEntry(Id64.toIdSet(categoryIds, true), func));\n }\n }\n\n private processCurrent(cache: SubCategoriesCache, entry: QueueEntry): void {\n assert(undefined !== this._request);\n assert(undefined === this._current);\n assert(undefined === this._next);\n\n this._current = entry;\n this._request.promise.then((completed: boolean) => { // eslint-disable-line @typescript-eslint/no-floating-promises\n if (this._disposed)\n return;\n\n // Invoke all the functions which were awaiting this set of IModelConnection.Categories.\n assert(undefined !== this._current);\n if (completed)\n for (const func of this._current.funcs)\n func(true);\n\n this._request = undefined;\n this._current = undefined;\n\n // If we have more requests, process them.\n const next = this._next;\n this._next = undefined;\n if (undefined !== next) {\n this._request = cache.load(next.categoryIds);\n if (undefined === this._request) {\n // All categories loaded.\n for (const func of next.funcs)\n func(true);\n } else {\n // We need to load the requested categories before invoking the pending functions.\n this.processCurrent(cache, next);\n }\n }\n });\n }\n\n private pushNext(categoryIds: Id64Arg, func: QueueFunc): void {\n assert(undefined !== this._current);\n assert(undefined !== this._request);\n\n if (undefined === this._next) {\n // We have a request currently in process and none pending.\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.\n // But we will find that out (synchronously) when current request completes, unless more requests come in. Probably not worth it.\n this._next = new QueueEntry(Id64.toIdSet(categoryIds, true), func);\n } else {\n // We have a request currently in process, and one or more pending. Append this one to the pending.\n this._next.funcs.push(func);\n for (const categoryId of Id64.iterable(categoryIds))\n this._next.categoryIds.add(categoryId);\n }\n }\n }\n}\n"]}
|
|
@@ -38,7 +38,7 @@ export declare class ViewGlobalLocationConstants {
|
|
|
38
38
|
* @internal
|
|
39
39
|
*/
|
|
40
40
|
export declare function metersToRange(inputMeters: number, minimumOutput?: number, maximumOutput?: number, maximumInputMeters?: number): number;
|
|
41
|
-
/** Queries the actual elevation of a cartographic point on the globe
|
|
41
|
+
/** Queries the actual elevation of a cartographic point on the globe.
|
|
42
42
|
* @public
|
|
43
43
|
* @extensions
|
|
44
44
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewGlobalLocation.d.ts","sourceRoot":"","sources":["../../src/ViewGlobalLocation.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAW,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAa,MAAM,oBAAoB,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAAG,SAAS,EAAE,YAAY,CAAC;IAAC,SAAS,EAAE,YAAY,CAAA;CAAE;AAExF;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAAG,MAAM,EAAE,YAAY,CAAC;IAAC,IAAI,CAAC,EAAE,kBAAkB,CAAA;CAAE;AAEnF,gBAAgB;AAChB,qBAAa,2BAA2B;IACtC,gBAAuB,4BAA4B,OAAS;IAC5D,gBAAuB,iCAAiC,SAAiB;IACzE,gBAAuB,eAAe,YAAc;IACpD,gBAAuB,qBAAqB,KAAO;IACnD,gBAAuB,sBAAsB,WAAW;CACzD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,aAAa,GAAE,MAAY,EAAE,aAAa,GAAE,MAAa,EAAE,kBAAkB,SAAgE,GAAG,MAAM,CAcxM;AAED;;;GAGG;AACH,wBAAsB,2BAA2B,CAAC,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"ViewGlobalLocation.d.ts","sourceRoot":"","sources":["../../src/ViewGlobalLocation.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAW,OAAO,EAAE,MAA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GG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,cAAc,EAAE,cAAc,UAAQ,GAAG,YAAY,GAAG,SAAS,CAcnH;AAED;;;GAGG;AACH,wBAAsB,+BAA+B,CAAC,QAAQ,EAAE,cAAc,EAAE,cAAc,UAAQ,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAczI;AAED,gBAAgB;AAChB,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,SAA2D,EAAE,iBAAiB,SAAI,EAAE,QAAQ,CAAC,EAAE,cAAc,GAAG,MAAM,CAc/M"}
|
|
@@ -17,7 +17,7 @@ exports.eyeToCartographicOnGlobe = eyeToCartographicOnGlobe;
|
|
|
17
17
|
exports.eyeToCartographicOnGlobeFromGcs = eyeToCartographicOnGlobeFromGcs;
|
|
18
18
|
exports.viewGlobalLocation = viewGlobalLocation;
|
|
19
19
|
const core_common_1 = require("@itwin/core-common");
|
|
20
|
-
const
|
|
20
|
+
const IModelApp_1 = require("./IModelApp");
|
|
21
21
|
const ViewState_1 = require("./ViewState");
|
|
22
22
|
/** @internal */
|
|
23
23
|
class ViewGlobalLocationConstants {
|
|
@@ -48,18 +48,15 @@ function metersToRange(inputMeters, minimumOutput = 500, maximumOutput = 3000, m
|
|
|
48
48
|
}
|
|
49
49
|
return output;
|
|
50
50
|
}
|
|
51
|
-
/** Queries the actual elevation of a cartographic point on the globe
|
|
51
|
+
/** Queries the actual elevation of a cartographic point on the globe.
|
|
52
52
|
* @public
|
|
53
53
|
* @extensions
|
|
54
54
|
*/
|
|
55
55
|
async function queryTerrainElevationOffset(viewport, carto) {
|
|
56
|
-
const bingElevationProvider = new internal_1.BingElevationProvider();
|
|
57
56
|
if (viewport && viewport.view instanceof ViewState_1.ViewState3d && viewport.iModel.isGeoLocated) {
|
|
58
57
|
const view3d = viewport.view;
|
|
59
58
|
if (view3d.displayStyle.displayTerrain) {
|
|
60
|
-
|
|
61
|
-
if (elevationOffset !== undefined)
|
|
62
|
-
return elevationOffset;
|
|
59
|
+
return IModelApp_1.IModelApp.elevationProvider.getHeight(carto, view3d.globeMode === core_common_1.GlobeMode.Ellipsoid);
|
|
63
60
|
}
|
|
64
61
|
}
|
|
65
62
|
return 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewGlobalLocation.js","sourceRoot":"","sources":["../../src/ViewGlobalLocation.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAqCH,sCAcC;AAMD,kEAWC;AAgBD,0CAIC;AAMD,wDAMC;AAKD,0DAMC;AAMD,4DAcC;AAMD,0EAcC;AAGD,gDAcC;AArKD,oDAA6D;AAC7D,8CAAwD;AAExD,2CAA0C;AAgB1C,gBAAgB;AAChB,MAAa,2BAA2B;IAC/B,MAAM,CAAU,4BAA4B,GAAG,KAAK,CAAC;IACrD,MAAM,CAAU,iCAAiC,GAAG,QAAQ,GAAG,EAAE,CAAC;IAClE,MAAM,CAAU,eAAe,GAAG,UAAU,CAAC,CAAC,2DAA2D;IACzG,MAAM,CAAU,qBAAqB,GAAG,GAAG,CAAC,CAAC,wBAAwB;IACrE,MAAM,CAAU,sBAAsB,GAAG,OAAO,CAAC,CAAC,yFAAyF;;AALpJ,kEAMC;AAED;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,WAAmB,EAAE,gBAAwB,GAAG,EAAE,gBAAwB,IAAI,EAAE,kBAAkB,GAAG,2BAA2B,CAAC,iCAAiC;IAC9L,IAAI,MAAc,CAAC;IACnB,IAAI,WAAW,IAAI,CAAC;QAClB,MAAM,GAAG,aAAa,CAAC;SACpB,IAAI,WAAW,IAAI,kBAAkB;QACxC,MAAM,GAAG,aAAa,CAAC;SACpB,CAAC;QACJ,MAAM,SAAS,GAAG,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW,EAAU,EAAE;YACpE,OAAO,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,KAAK,GA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S,GAAG,2BAA2B,CAAC,4BAA4B,EAAE,iBAAiB,GAAG,CAAC,EAAE,QAAyB;IACrM,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,YAAY,uBAAW,CAAC;QACzC,OAAO,CAAC,CAAC;IAEX,MAAM,MAAM,GAAG,QAAQ,CAAC,UAAU,EAAE,CAAC;IACrC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC;IAE7B,MAAM,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC,SAAS,EAAE,iBAAiB,EAAE,QAAQ,CAAC,CAAC;IAC/F,QAAQ,CAAC,aAAa,EAAE,CAAC;IAEzB,IAAI,SAAS;QACX,QAAQ,CAAC,gBAAgB,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,aAAa,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;IAE1F,OAAO,kBAAkB,CAAC;AAC5B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Views\n */\n\nimport { Point3d, Range3d } from \"@itwin/core-geometry\";\nimport { Cartographic, GlobeMode } from \"@itwin/core-common\";\nimport { BingElevationProvider } from \"./tile/internal\";\nimport { ScreenViewport } from \"./Viewport\";\nimport { ViewState3d } from \"./ViewState\";\n\n/** Describes a rectangular area of the earth using cartographic data structures.\n * @public\n * @extensions\n */\nexport interface GlobalLocationArea { southwest: Cartographic, northeast: Cartographic }\n\n/** Describes a location on the earth using cartographic data structures.\n * The viewed area of the location can be optionally specified.\n * The center of the location is specified with the center position.\n * @public\n * @extensions\n */\nexport interface GlobalLocation { center: Cartographic, area?: GlobalLocationArea }\n\n/** @internal */\nexport class ViewGlobalLocationConstants {\n public static readonly birdHeightAboveEarthInMeters = 713.0;\n public static readonly satelliteHeightAboveEarthInMeters = 402336.0 * 24;\n public static readonly largestEarthArc = 20037500.0; // distance from point on earth to opposite point in meters\n public static readonly birdPitchAngleRadians = 0.0; // Angle.piOver4Radians;\n public static readonly maximumDistanceToDrive = 96560.6; // The distance in meters that we will \"drive\" instead of fly to a destination (60 miles)\n}\n\n/** Converts a distance in meters to some range (smaller distances result in lower number; longer distances result in larger number)\n * Uses 500 for minimum output and 3000 for maximum output, unless either are specified.\n * Uses [[ViewGlobalLocationConstants.satelliteHeightAboveEarthInMeters]] as maximum input meters unless specified.\n * A good use of this is to convert meters to some transition duration.\n * @internal\n */\nexport function metersToRange(inputMeters: number, minimumOutput: number = 500, maximumOutput: number = 3000, maximumInputMeters = ViewGlobalLocationConstants.satelliteHeightAboveEarthInMeters): number {\n let output: number;\n if (inputMeters <= 0)\n output = minimumOutput;\n else if (inputMeters >= maximumInputMeters)\n output = maximumOutput;\n else {\n const quickLerp = (start: number, end: number, amt: number): number => {\n return (1 - amt) * start + amt * end;\n };\n output = quickLerp(minimumOutput, maximumOutput, inputMeters / maximumInputMeters);\n }\n\n return output;\n}\n\n/** Queries the actual elevation of a cartographic point on the globe (using Bing elevation services)\n * @public\n * @extensions\n */\nexport async function queryTerrainElevationOffset(viewport: ScreenViewport, carto: Cartographic): Promise<number> {\n const bingElevationProvider = new BingElevationProvider();\n if (viewport && viewport.view instanceof ViewState3d && viewport.iModel.isGeoLocated) {\n const view3d = viewport.view;\n if (view3d.displayStyle.displayTerrain) {\n const elevationOffset = await bingElevationProvider.getHeight(carto, view3d.globeMode === GlobeMode.Ellipsoid);\n if (elevationOffset !== undefined)\n return elevationOffset;\n }\n }\n return 0;\n}\n\nfunction _areaToEyeHeight(view3d: ViewState3d, ne?: Point3d, sw?: Point3d, offset = 0): number {\n if (ne === undefined || sw === undefined)\n return 0;\n const diagonal = ne.distance(sw);\n\n view3d.camera.validateLens();\n const td = Math.tan(view3d.camera.getLensAngle().radians / 2.0);\n return 0 !== td ? (diagonal / (2 * td) + offset) : offset;\n}\n\n/** Converts a cartographic area on the globe to an ideal eye height to view that area.\n * Offset in meters, which defaults to 0, is applied to final eye height.\n * @internal\n */\nexport function areaToEyeHeight(view3d: ViewState3d, area: GlobalLocationArea, offset = 0): number {\n const ne = view3d.cartographicToRoot(area.northeast);\n const sw = view3d.cartographicToRoot(area.southwest);\n return _areaToEyeHeight(view3d, ne, sw, offset);\n}\n\n/** Converts a cartographic area on the globe to an ideal eye height to view that area using the GCS.\n * Offset in meters, which defaults to 0, is applied to final eye height.\n * @internal\n */\nexport async function areaToEyeHeightFromGcs(view3d: ViewState3d, area: GlobalLocationArea, offset = 0): Promise<number> {\n const corners = await view3d.cartographicToRootUsingGcs([area.northeast, area.southwest]);\n if (!corners)\n return 0;\n\n return _areaToEyeHeight(view3d, corners[0], corners[1], offset);\n}\n\n/** Converts a root range (often project extents) to a cartographic area.\n * @internal\n */\nexport function rangeToCartographicArea(view3d: ViewState3d, range: Range3d): GlobalLocationArea | undefined {\n const low = view3d.rootToCartographic(range.low);\n const high = view3d.rootToCartographic(range.high);\n if (low === undefined || high === undefined)\n return undefined;\n return low.latitude < high.latitude ? { northeast: high, southwest: low } : { northeast: low, southwest: high };\n}\n\n/** Converts the eye of the camera to a cartographic location on the globe as if it was at height 0.\n * If preserveHeight is set to true, then height will remain untouched.\n * @internal\n */\nexport function eyeToCartographicOnGlobe(viewport: ScreenViewport, preserveHeight = false): Cartographic | undefined {\n if (!(viewport.view instanceof ViewState3d) || !viewport.iModel.isGeoLocated)\n return undefined;\n\n const view3d = viewport.view;\n\n const eyePointCartographic = view3d.rootToCartographic(view3d.getEyeOrOrthographicViewPoint());\n if (eyePointCartographic !== undefined) {\n if (!preserveHeight)\n eyePointCartographic.height = 0.0;\n return eyePointCartographic;\n }\n\n return undefined;\n}\n\n/** Converts the eye of the camera to a cartographic location on the globe as if it was at height 0 using the GCS.\n * If preserveHeight is set to true, then height will remain untouched.\n * @internal\n */\nexport async function eyeToCartographicOnGlobeFromGcs(viewport: ScreenViewport, preserveHeight = false): Promise<Cartographic | undefined> {\n if (!(viewport.view instanceof ViewState3d) || !viewport.iModel.isGeoLocated)\n return undefined;\n\n const view3d = viewport.view;\n\n const eyePointCartographic = await view3d.rootToCartographicFromGcs(view3d.getEyeOrOrthographicViewPoint());\n if (eyePointCartographic !== undefined) {\n if (!preserveHeight)\n eyePointCartographic.height = 0.0;\n return eyePointCartographic;\n }\n\n return undefined;\n}\n\n/** @internal */\nexport function viewGlobalLocation(viewport: ScreenViewport, doAnimate: boolean, eyeHeight = ViewGlobalLocationConstants.birdHeightAboveEarthInMeters, pitchAngleRadians = 0, location?: GlobalLocation): number {\n if (!(viewport.view instanceof ViewState3d))\n return 0;\n\n const before = viewport.getFrustum();\n const view3d = viewport.view;\n\n const transitionDistance = view3d.lookAtGlobalLocation(eyeHeight, pitchAngleRadians, location);\n viewport.synchWithView();\n\n if (doAnimate)\n viewport.animateToCurrent(before, { animationTime: metersToRange(transitionDistance) });\n\n return transitionDistance;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ViewGlobalLocation.js","sourceRoot":"","sources":["../../src/ViewGlobalLocation.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAqCH,sCAcC;AAMD,kEAQC;AAgBD,0CAIC;AAMD,wDAMC;AAKD,0DAMC;AAMD,4DAcC;AAMD,0EAcC;AAGD,gDAcC;AAlKD,oDAA6D;AAC7D,2CAAwC;AAExC,2CAA0C;AAgB1C,gBAAgB;AAChB,MAAa,2BAA2B;IAC/B,MAAM,CAAU,4BAA4B,GAAG,KAAK,CAAC;IACrD,MAAM,CAAU,iCAAiC,GAAG,QAAQ,GAAG,EAAE,CAAC;IAClE,MAAM,CAAU,eAAe,GAAG,UAAU,CAAC,CAAC,2DAA2D;IACzG,MAAM,CAAU,qBAAqB,GAAG,GAAG,CAAC,CAAC,wBAAwB;IACrE,MAAM,CAAU,sBAAsB,GAAG,OAAO,CAAC,CAAC,yFAAyF;;AALpJ,kEAMC;AAED;;;;;GAKG;AACH,SAAgB,aAAa,CAA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AAC;IAC5G,IAAI,oBAAoB,KAAK,SAAS,EAAE,CAAC;QACvC,IAAI,CAAC,cAAc;YACjB,oBAAoB,CAAC,MAAM,GAAG,GAAG,CAAC;QACpC,OAAO,oBAAoB,CAAC;IAC9B,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,gBAAgB;AAChB,SAAgB,kBAAkB,CAAC,QAAwB,EAAE,SAAkB,EAAE,SAAS,GAAG,2BAA2B,CAAC,4BAA4B,EAAE,iBAAiB,GAAG,CAAC,EAAE,QAAyB;IACrM,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,YAAY,uBAAW,CAAC;QACzC,OAAO,CAAC,CAAC;IAEX,MAAM,MAAM,GAAG,QAAQ,CAAC,UAAU,EAAE,CAAC;IACrC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC;IAE7B,MAAM,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC,SAAS,EAAE,iBAAiB,EAAE,QAAQ,CAAC,CAAC;IAC/F,QAAQ,CAAC,aAAa,EAAE,CAAC;IAEzB,IAAI,SAAS;QACX,QAAQ,CAAC,gBAAgB,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,aAAa,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;IAE1F,OAAO,kBAAkB,CAAC;AAC5B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Views\n */\n\nimport { Point3d, Range3d } from \"@itwin/core-geometry\";\nimport { Cartographic, GlobeMode } from \"@itwin/core-common\";\nimport { IModelApp } from \"./IModelApp\";\nimport { ScreenViewport } from \"./Viewport\";\nimport { ViewState3d } from \"./ViewState\";\n\n/** Describes a rectangular area of the earth using cartographic data structures.\n * @public\n * @extensions\n */\nexport interface GlobalLocationArea { southwest: Cartographic, northeast: Cartographic }\n\n/** Describes a location on the earth using cartographic data structures.\n * The viewed area of the location can be optionally specified.\n * The center of the location is specified with the center position.\n * @public\n * @extensions\n */\nexport interface GlobalLocation { center: Cartographic, area?: GlobalLocationArea }\n\n/** @internal */\nexport class ViewGlobalLocationConstants {\n public static readonly birdHeightAboveEarthInMeters = 713.0;\n public static readonly satelliteHeightAboveEarthInMeters = 402336.0 * 24;\n public static readonly largestEarthArc = 20037500.0; // distance from point on earth to opposite point in meters\n public static readonly birdPitchAngleRadians = 0.0; // Angle.piOver4Radians;\n public static readonly maximumDistanceToDrive = 96560.6; // The distance in meters that we will \"drive\" instead of fly to a destination (60 miles)\n}\n\n/** Converts a distance in meters to some range (smaller distances result in lower number; longer distances result in larger number)\n * Uses 500 for minimum output and 3000 for maximum output, unless either are specified.\n * Uses [[ViewGlobalLocationConstants.satelliteHeightAboveEarthInMeters]] as maximum input meters unless specified.\n * A good use of this is to convert meters to some transition duration.\n * @internal\n */\nexport function metersToRange(inputMeters: number, minimumOutput: number = 500, maximumOutput: number = 3000, maximumInputMeters = ViewGlobalLocationConstants.satelliteHeightAboveEarthInMeters): number {\n let output: number;\n if (inputMeters <= 0)\n output = minimumOutput;\n else if (inputMeters >= maximumInputMeters)\n output = maximumOutput;\n else {\n const quickLerp = (start: number, end: number, amt: number): number => {\n return (1 - amt) * start + amt * end;\n };\n output = quickLerp(minimumOutput, maximumOutput, inputMeters / maximumInputMeters);\n }\n\n return output;\n}\n\n/** Queries the actual elevation of a cartographic point on the globe.\n * @public\n * @extensions\n */\nexport async function queryTerrainElevationOffset(viewport: ScreenViewport, carto: Cartographic): Promise<number> {\n if (viewport && viewport.view instanceof ViewState3d && viewport.iModel.isGeoLocated) {\n const view3d = viewport.view;\n if (view3d.displayStyle.displayTerrain) {\n return IModelApp.elevationProvider.getHeight(carto, view3d.globeMode === GlobeMode.Ellipsoid);\n }\n }\n return 0;\n}\n\nfunction _areaToEyeHeight(view3d: ViewState3d, ne?: Point3d, sw?: Point3d, offset = 0): number {\n if (ne === undefined || sw === undefined)\n return 0;\n const diagonal = ne.distance(sw);\n\n view3d.camera.validateLens();\n const td = Math.tan(view3d.camera.getLensAngle().radians / 2.0);\n return 0 !== td ? (diagonal / (2 * td) + offset) : offset;\n}\n\n/** Converts a cartographic area on the globe to an ideal eye height to view that area.\n * Offset in meters, which defaults to 0, is applied to final eye height.\n * @internal\n */\nexport function areaToEyeHeight(view3d: ViewState3d, area: GlobalLocationArea, offset = 0): number {\n const ne = view3d.cartographicToRoot(area.northeast);\n const sw = view3d.cartographicToRoot(area.southwest);\n return _areaToEyeHeight(view3d, ne, sw, offset);\n}\n\n/** Converts a cartographic area on the globe to an ideal eye height to view that area using the GCS.\n * Offset in meters, which defaults to 0, is applied to final eye height.\n * @internal\n */\nexport async function areaToEyeHeightFromGcs(view3d: ViewState3d, area: GlobalLocationArea, offset = 0): Promise<number> {\n const corners = await view3d.cartographicToRootUsingGcs([area.northeast, area.southwest]);\n if (!corners)\n return 0;\n\n return _areaToEyeHeight(view3d, corners[0], corners[1], offset);\n}\n\n/** Converts a root range (often project extents) to a cartographic area.\n * @internal\n */\nexport function rangeToCartographicArea(view3d: ViewState3d, range: Range3d): GlobalLocationArea | undefined {\n const low = view3d.rootToCartographic(range.low);\n const high = view3d.rootToCartographic(range.high);\n if (low === undefined || high === undefined)\n return undefined;\n return low.latitude < high.latitude ? { northeast: high, southwest: low } : { northeast: low, southwest: high };\n}\n\n/** Converts the eye of the camera to a cartographic location on the globe as if it was at height 0.\n * If preserveHeight is set to true, then height will remain untouched.\n * @internal\n */\nexport function eyeToCartographicOnGlobe(viewport: ScreenViewport, preserveHeight = false): Cartographic | undefined {\n if (!(viewport.view instanceof ViewState3d) || !viewport.iModel.isGeoLocated)\n return undefined;\n\n const view3d = viewport.view;\n\n const eyePointCartographic = view3d.rootToCartographic(view3d.getEyeOrOrthographicViewPoint());\n if (eyePointCartographic !== undefined) {\n if (!preserveHeight)\n eyePointCartographic.height = 0.0;\n return eyePointCartographic;\n }\n\n return undefined;\n}\n\n/** Converts the eye of the camera to a cartographic location on the globe as if it was at height 0 using the GCS.\n * If preserveHeight is set to true, then height will remain untouched.\n * @internal\n */\nexport async function eyeToCartographicOnGlobeFromGcs(viewport: ScreenViewport, preserveHeight = false): Promise<Cartographic | undefined> {\n if (!(viewport.view instanceof ViewState3d) || !viewport.iModel.isGeoLocated)\n return undefined;\n\n const view3d = viewport.view;\n\n const eyePointCartographic = await view3d.rootToCartographicFromGcs(view3d.getEyeOrOrthographicViewPoint());\n if (eyePointCartographic !== undefined) {\n if (!preserveHeight)\n eyePointCartographic.height = 0.0;\n return eyePointCartographic;\n }\n\n return undefined;\n}\n\n/** @internal */\nexport function viewGlobalLocation(viewport: ScreenViewport, doAnimate: boolean, eyeHeight = ViewGlobalLocationConstants.birdHeightAboveEarthInMeters, pitchAngleRadians = 0, location?: GlobalLocation): number {\n if (!(viewport.view instanceof ViewState3d))\n return 0;\n\n const before = viewport.getFrustum();\n const view3d = viewport.view;\n\n const transitionDistance = view3d.lookAtGlobalLocation(eyeHeight, pitchAngleRadians, location);\n viewport.synchWithView();\n\n if (doAnimate)\n viewport.animateToCurrent(before, { animationTime: metersToRange(transitionDistance) });\n\n return transitionDistance;\n}\n"]}
|
package/lib/cjs/ViewState.d.ts
CHANGED
|
@@ -301,7 +301,7 @@ export declare abstract class ViewState extends ElementState {
|
|
|
301
301
|
/** Execute a function against each [[TileTreeReference]] associated with this view.
|
|
302
302
|
* This may include tile trees not associated with any [[GeometricModelState]] - e.g., context reality data.
|
|
303
303
|
* @note This method is inefficient (iteration cannot be aborted) and awkward (callback cannot be async nor return a value). Prefer to iterate using [[getTileTreeRefs]].
|
|
304
|
-
* @deprecated in 5.0 -
|
|
304
|
+
* @deprecated in 5.0 - might be removed in next major version. Use [[getTileTreeRefs]] instead.
|
|
305
305
|
*/
|
|
306
306
|
forEachTileTreeRef(func: (treeRef: TileTreeReference) => void): void;
|
|
307
307
|
/** Iterate all [[TileTreeReference]]s associated with this view.
|
package/lib/cjs/ViewState.js
CHANGED
|
@@ -280,7 +280,7 @@ class ViewState extends EntityState_1.ElementState {
|
|
|
280
280
|
/** Execute a function against each [[TileTreeReference]] associated with this view.
|
|
281
281
|
* This may include tile trees not associated with any [[GeometricModelState]] - e.g., context reality data.
|
|
282
282
|
* @note This method is inefficient (iteration cannot be aborted) and awkward (callback cannot be async nor return a value). Prefer to iterate using [[getTileTreeRefs]].
|
|
283
|
-
* @deprecated in 5.0 -
|
|
283
|
+
* @deprecated in 5.0 - might be removed in next major version. Use [[getTileTreeRefs]] instead.
|
|
284
284
|
*/
|
|
285
285
|
forEachTileTreeRef(func) {
|
|
286
286
|
for (const ref of this.getModelTreeRefs()) {
|