@itwin/core-frontend 3.1.0-dev.7 → 3.1.0-dev.8

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.
Files changed (187) hide show
  1. package/lib/cjs/BriefcaseConnection.d.ts.map +1 -1
  2. package/lib/cjs/BriefcaseConnection.js +6 -5
  3. package/lib/cjs/BriefcaseConnection.js.map +1 -1
  4. package/lib/cjs/DrawingViewState.js +3 -3
  5. package/lib/cjs/DrawingViewState.js.map +1 -1
  6. package/lib/cjs/SheetViewState.js +3 -3
  7. package/lib/cjs/SheetViewState.js.map +1 -1
  8. package/lib/cjs/Viewport.d.ts +6 -3
  9. package/lib/cjs/Viewport.d.ts.map +1 -1
  10. package/lib/cjs/Viewport.js +16 -9
  11. package/lib/cjs/Viewport.js.map +1 -1
  12. package/lib/cjs/tile/DynamicIModelTile.d.ts.map +1 -1
  13. package/lib/cjs/tile/DynamicIModelTile.js +1 -1
  14. package/lib/cjs/tile/DynamicIModelTile.js.map +1 -1
  15. package/lib/cjs/tile/LRUTileList.d.ts +29 -29
  16. package/lib/cjs/tile/LRUTileList.d.ts.map +1 -1
  17. package/lib/cjs/tile/LRUTileList.js +50 -50
  18. package/lib/cjs/tile/LRUTileList.js.map +1 -1
  19. package/lib/cjs/tile/OrbitGtTileTree.js +1 -1
  20. package/lib/cjs/tile/OrbitGtTileTree.js.map +1 -1
  21. package/lib/cjs/tile/RealityModelTileTree.d.ts.map +1 -1
  22. package/lib/cjs/tile/RealityModelTileTree.js +1 -1
  23. package/lib/cjs/tile/RealityModelTileTree.js.map +1 -1
  24. package/lib/cjs/tile/RealityTile.d.ts +2 -2
  25. package/lib/cjs/tile/RealityTile.d.ts.map +1 -1
  26. package/lib/cjs/tile/RealityTile.js +2 -2
  27. package/lib/cjs/tile/RealityTile.js.map +1 -1
  28. package/lib/cjs/tile/RealityTileLoader.d.ts +2 -2
  29. package/lib/cjs/tile/RealityTileLoader.d.ts.map +1 -1
  30. package/lib/cjs/tile/RealityTileLoader.js +1 -1
  31. package/lib/cjs/tile/RealityTileLoader.js.map +1 -1
  32. package/lib/cjs/tile/RealityTileTree.js +1 -1
  33. package/lib/cjs/tile/RealityTileTree.js.map +1 -1
  34. package/lib/cjs/tile/Tile.d.ts +5 -4
  35. package/lib/cjs/tile/Tile.d.ts.map +1 -1
  36. package/lib/cjs/tile/Tile.js +3 -2
  37. package/lib/cjs/tile/Tile.js.map +1 -1
  38. package/lib/cjs/tile/TileAdmin.d.ts +43 -45
  39. package/lib/cjs/tile/TileAdmin.d.ts.map +1 -1
  40. package/lib/cjs/tile/TileAdmin.js +104 -99
  41. package/lib/cjs/tile/TileAdmin.js.map +1 -1
  42. package/lib/cjs/tile/TileRequest.d.ts +12 -9
  43. package/lib/cjs/tile/TileRequest.d.ts.map +1 -1
  44. package/lib/cjs/tile/TileRequest.js +19 -11
  45. package/lib/cjs/tile/TileRequest.js.map +1 -1
  46. package/lib/cjs/tile/TileRequestChannel.js +3 -3
  47. package/lib/cjs/tile/TileRequestChannel.js.map +1 -1
  48. package/lib/cjs/tile/TileTree.js +1 -1
  49. package/lib/cjs/tile/TileTree.js.map +1 -1
  50. package/lib/cjs/tile/TileTreeReference.d.ts +1 -1
  51. package/lib/cjs/tile/TileTreeReference.js +1 -1
  52. package/lib/cjs/tile/TileTreeReference.js.map +1 -1
  53. package/lib/cjs/tile/TileUsageMarker.d.ts +9 -9
  54. package/lib/cjs/tile/TileUsageMarker.d.ts.map +1 -1
  55. package/lib/cjs/tile/TileUsageMarker.js +9 -9
  56. package/lib/cjs/tile/TileUsageMarker.js.map +1 -1
  57. package/lib/cjs/tile/TileUser.d.ts +33 -0
  58. package/lib/cjs/tile/TileUser.d.ts.map +1 -0
  59. package/lib/cjs/tile/TileUser.js +28 -0
  60. package/lib/cjs/tile/TileUser.js.map +1 -0
  61. package/lib/cjs/tile/TileUserSet.d.ts +28 -0
  62. package/lib/cjs/tile/TileUserSet.d.ts.map +1 -0
  63. package/lib/cjs/tile/TileUserSet.js +123 -0
  64. package/lib/cjs/tile/TileUserSet.js.map +1 -0
  65. package/lib/cjs/tile/internal.d.ts +2 -0
  66. package/lib/cjs/tile/internal.d.ts.map +1 -1
  67. package/lib/cjs/tile/internal.js +2 -0
  68. package/lib/cjs/tile/internal.js.map +1 -1
  69. package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts +1 -2
  70. package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
  71. package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +1 -1
  72. package/lib/cjs/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
  73. package/lib/cjs/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts +1 -2
  74. package/lib/cjs/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts.map +1 -1
  75. package/lib/cjs/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js +1 -1
  76. package/lib/cjs/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js.map +1 -1
  77. package/lib/cjs/tile/map/ImageryProviders/BingImageryProvider.js +1 -1
  78. package/lib/cjs/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
  79. package/lib/cjs/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts +1 -2
  80. package/lib/cjs/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts.map +1 -1
  81. package/lib/cjs/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js +1 -1
  82. package/lib/cjs/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js.map +1 -1
  83. package/lib/cjs/tile/map/ImageryTileTree.d.ts +2 -2
  84. package/lib/cjs/tile/map/ImageryTileTree.d.ts.map +1 -1
  85. package/lib/cjs/tile/map/ImageryTileTree.js +1 -1
  86. package/lib/cjs/tile/map/ImageryTileTree.js.map +1 -1
  87. package/lib/cjs/tile/map/MapTileTree.d.ts +3 -3
  88. package/lib/cjs/tile/map/MapTileTree.js +4 -4
  89. package/lib/cjs/tile/map/MapTileTree.js.map +1 -1
  90. package/lib/esm/BriefcaseConnection.d.ts.map +1 -1
  91. package/lib/esm/BriefcaseConnection.js +6 -5
  92. package/lib/esm/BriefcaseConnection.js.map +1 -1
  93. package/lib/esm/DrawingViewState.js +3 -3
  94. package/lib/esm/DrawingViewState.js.map +1 -1
  95. package/lib/esm/SheetViewState.js +3 -3
  96. package/lib/esm/SheetViewState.js.map +1 -1
  97. package/lib/esm/Viewport.d.ts +6 -3
  98. package/lib/esm/Viewport.d.ts.map +1 -1
  99. package/lib/esm/Viewport.js +17 -10
  100. package/lib/esm/Viewport.js.map +1 -1
  101. package/lib/esm/tile/DynamicIModelTile.d.ts.map +1 -1
  102. package/lib/esm/tile/DynamicIModelTile.js +1 -1
  103. package/lib/esm/tile/DynamicIModelTile.js.map +1 -1
  104. package/lib/esm/tile/LRUTileList.d.ts +29 -29
  105. package/lib/esm/tile/LRUTileList.d.ts.map +1 -1
  106. package/lib/esm/tile/LRUTileList.js +47 -47
  107. package/lib/esm/tile/LRUTileList.js.map +1 -1
  108. package/lib/esm/tile/OrbitGtTileTree.js +1 -1
  109. package/lib/esm/tile/OrbitGtTileTree.js.map +1 -1
  110. package/lib/esm/tile/RealityModelTileTree.d.ts.map +1 -1
  111. package/lib/esm/tile/RealityModelTileTree.js +1 -1
  112. package/lib/esm/tile/RealityModelTileTree.js.map +1 -1
  113. package/lib/esm/tile/RealityTile.d.ts +2 -2
  114. package/lib/esm/tile/RealityTile.d.ts.map +1 -1
  115. package/lib/esm/tile/RealityTile.js +2 -2
  116. package/lib/esm/tile/RealityTile.js.map +1 -1
  117. package/lib/esm/tile/RealityTileLoader.d.ts +2 -2
  118. package/lib/esm/tile/RealityTileLoader.d.ts.map +1 -1
  119. package/lib/esm/tile/RealityTileLoader.js +1 -1
  120. package/lib/esm/tile/RealityTileLoader.js.map +1 -1
  121. package/lib/esm/tile/RealityTileTree.js +1 -1
  122. package/lib/esm/tile/RealityTileTree.js.map +1 -1
  123. package/lib/esm/tile/Tile.d.ts +5 -4
  124. package/lib/esm/tile/Tile.d.ts.map +1 -1
  125. package/lib/esm/tile/Tile.js +3 -2
  126. package/lib/esm/tile/Tile.js.map +1 -1
  127. package/lib/esm/tile/TileAdmin.d.ts +43 -45
  128. package/lib/esm/tile/TileAdmin.d.ts.map +1 -1
  129. package/lib/esm/tile/TileAdmin.js +105 -100
  130. package/lib/esm/tile/TileAdmin.js.map +1 -1
  131. package/lib/esm/tile/TileRequest.d.ts +12 -9
  132. package/lib/esm/tile/TileRequest.d.ts.map +1 -1
  133. package/lib/esm/tile/TileRequest.js +19 -11
  134. package/lib/esm/tile/TileRequest.js.map +1 -1
  135. package/lib/esm/tile/TileRequestChannel.js +3 -3
  136. package/lib/esm/tile/TileRequestChannel.js.map +1 -1
  137. package/lib/esm/tile/TileTree.js +1 -1
  138. package/lib/esm/tile/TileTree.js.map +1 -1
  139. package/lib/esm/tile/TileTreeReference.d.ts +1 -1
  140. package/lib/esm/tile/TileTreeReference.js +1 -1
  141. package/lib/esm/tile/TileTreeReference.js.map +1 -1
  142. package/lib/esm/tile/TileUsageMarker.d.ts +9 -9
  143. package/lib/esm/tile/TileUsageMarker.d.ts.map +1 -1
  144. package/lib/esm/tile/TileUsageMarker.js +9 -9
  145. package/lib/esm/tile/TileUsageMarker.js.map +1 -1
  146. package/lib/esm/tile/TileUser.d.ts +33 -0
  147. package/lib/esm/tile/TileUser.d.ts.map +1 -0
  148. package/lib/esm/tile/TileUser.js +25 -0
  149. package/lib/esm/tile/TileUser.js.map +1 -0
  150. package/lib/esm/tile/TileUserSet.d.ts +28 -0
  151. package/lib/esm/tile/TileUserSet.d.ts.map +1 -0
  152. package/lib/esm/tile/TileUserSet.js +118 -0
  153. package/lib/esm/tile/TileUserSet.js.map +1 -0
  154. package/lib/esm/tile/internal.d.ts +2 -0
  155. package/lib/esm/tile/internal.d.ts.map +1 -1
  156. package/lib/esm/tile/internal.js +2 -0
  157. package/lib/esm/tile/internal.js.map +1 -1
  158. package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts +1 -2
  159. package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
  160. package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +1 -1
  161. package/lib/esm/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
  162. package/lib/esm/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts +1 -2
  163. package/lib/esm/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.d.ts.map +1 -1
  164. package/lib/esm/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js +1 -1
  165. package/lib/esm/tile/map/ImageryProviders/AzureMapsLayerImageryProvider.js.map +1 -1
  166. package/lib/esm/tile/map/ImageryProviders/BingImageryProvider.js +1 -1
  167. package/lib/esm/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
  168. package/lib/esm/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts +1 -2
  169. package/lib/esm/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts.map +1 -1
  170. package/lib/esm/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js +1 -1
  171. package/lib/esm/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js.map +1 -1
  172. package/lib/esm/tile/map/ImageryTileTree.d.ts +2 -2
  173. package/lib/esm/tile/map/ImageryTileTree.d.ts.map +1 -1
  174. package/lib/esm/tile/map/ImageryTileTree.js +1 -1
  175. package/lib/esm/tile/map/ImageryTileTree.js.map +1 -1
  176. package/lib/esm/tile/map/MapTileTree.d.ts +3 -3
  177. package/lib/esm/tile/map/MapTileTree.js +4 -4
  178. package/lib/esm/tile/map/MapTileTree.js.map +1 -1
  179. package/package.json +20 -20
  180. package/lib/cjs/ViewportSet.d.ts +0 -28
  181. package/lib/cjs/ViewportSet.d.ts.map +0 -1
  182. package/lib/cjs/ViewportSet.js +0 -126
  183. package/lib/cjs/ViewportSet.js.map +0 -1
  184. package/lib/esm/ViewportSet.d.ts +0 -28
  185. package/lib/esm/ViewportSet.d.ts.map +0 -1
  186. package/lib/esm/ViewportSet.js +0 -121
  187. package/lib/esm/ViewportSet.js.map +0 -1
@@ -5,8 +5,7 @@ import { BeDuration, BeEvent, Id64Array } from "@itwin/core-bentley";
5
5
  import { ElementGraphicsRequestProps, IModelTileTreeProps, TileVersionInfo } from "@itwin/core-common";
6
6
  import { IModelConnection } from "../IModelConnection";
7
7
  import { Viewport } from "../Viewport";
8
- import { ReadonlyViewportSet } from "../ViewportSet";
9
- import { IModelTileTree, Tile, TileRequestChannels, TileTreeOwner, TileUsageMarker } from "./internal";
8
+ import { IModelTileTree, ReadonlyTileUserSet, Tile, TileRequestChannels, TileTreeOwner, TileUsageMarker, TileUser } from "./internal";
10
9
  /** Details about any tiles not handled by [[TileAdmin]]. At this time, that means OrbitGT point cloud tiles.
11
10
  * Used for bookkeeping by SelectedAndReadyTiles
12
11
  * @internal
@@ -84,11 +83,11 @@ export interface GpuMemoryLimits {
84
83
  export declare class TileAdmin {
85
84
  private _versionInfo?;
86
85
  readonly channels: TileRequestChannels;
87
- private readonly _viewports;
88
- private readonly _requestsPerViewport;
89
- private readonly _tileUsagePerViewport;
86
+ private readonly _users;
87
+ private readonly _requestsPerUser;
88
+ private readonly _tileUsagePerUser;
90
89
  private readonly _selectedAndReady;
91
- private readonly _viewportSetsForRequests;
90
+ private readonly _tileUserSetsForRequests;
92
91
  private readonly _maxActiveTileTreePropsRequests;
93
92
  private _defaultTileSizeModifier;
94
93
  private readonly _retryInterval;
@@ -148,7 +147,7 @@ export declare class TileAdmin {
148
147
  */
149
148
  static create(props?: TileAdmin.Props): Promise<TileAdmin>;
150
149
  /** @internal */
151
- get emptyViewportSet(): ReadonlyViewportSet;
150
+ get emptyTileUserSet(): ReadonlyTileUserSet;
152
151
  /** Returns basic statistics about the TileAdmin's current state. */
153
152
  get statistics(): TileAdmin.Statistics;
154
153
  /** Resets the cumulative (per-session) statistics like totalCompletedRequests, totalEmptyTiles, etc. */
@@ -197,84 +196,83 @@ export declare class TileAdmin {
197
196
  * @internal
198
197
  */
199
198
  process(): void;
200
- /** Iterate over the tiles that have content loaded but are not selected for display in any viewport.
199
+ /** Iterate over the tiles that have content loaded but are not in use by any [[TileUser]].
201
200
  * @alpha
202
201
  */
203
202
  get unselectedLoadedTiles(): Iterable<Tile>;
204
- /** Iterate over the tiles that have content loaded and are selected for display in any viewport.
203
+ /** Iterate over the tiles that have content loaded and are in use by any [[TileUser]].
205
204
  * @alpha
206
205
  */
207
206
  get selectedLoadedTiles(): Iterable<Tile>;
208
207
  /** Returns the number of pending and active requests associated with the specified viewport. */
209
208
  getNumRequestsForViewport(vp: Viewport): number;
210
- /** Returns the current set of Tiles requested by the specified Viewport.
209
+ /** Returns the number of pending and active requests associated with the specified user. */
210
+ getNumRequestsForUser(user: TileUser): number;
211
+ /** Returns the current set of Tiles requested by the specified TileUser.
211
212
  * Do not modify the set or the Tiles.
212
213
  * @internal
213
214
  */
214
- getRequestsForViewport(vp: Viewport): Set<Tile> | undefined;
215
- /** Specifies the set of tiles currently requested for use by a viewport. This set replaces any previously specified for the same viewport.
215
+ getRequestsForUser(user: TileUser): Set<Tile> | undefined;
216
+ /** Specifies the set of tiles currently requested for use by a TileUser. This set replaces any previously specified for the same user.
216
217
  * The requests are not actually processed until the next call to [[TileAdmin.process].
217
- * This is typically invoked when the viewport recreates its scene, e.g. in response to camera movement.
218
+ * This is typically invoked when a viewport recreates its scene, e.g. in response to camera movement.
218
219
  * @internal
219
220
  */
220
- requestTiles(vp: Viewport, tiles: Set<Tile>): void;
221
- /** Returns two sets of tiles associated with the specified Viewport's current scene.
221
+ requestTiles(user: TileUser, tiles: Set<Tile>): void;
222
+ /** Returns two sets of tiles associated with the specified user - typically, a viewport's current scene.
222
223
  * Do not modify the returned sets.
223
224
  * @internal
224
225
  */
225
- getTilesForViewport(vp: Viewport): SelectedAndReadyTiles | undefined;
226
- /** Adds the specified tiles to the sets of selected and ready tiles for the specified Viewport.
226
+ getTilesForUser(user: TileUser): SelectedAndReadyTiles | undefined;
227
+ /** Adds the specified tiles to the sets of selected and ready tiles for the specified TileUser.
227
228
  * The TileAdmin takes ownership of the `ready` set - do not modify it after passing it in.
228
229
  * @internal
229
230
  */
230
- addTilesForViewport(vp: Viewport, selected: Tile[], ready: Set<Tile>): void;
231
+ addTilesForUser(user: TileUser, selected: Tile[], ready: Set<Tile>): void;
231
232
  /** Disclose statistics about tiles that are handled externally from TileAdmin. At this time, that means OrbitGT point cloud tiles.
232
- * These statistics are included in the return value of [[getTilesForViewport]].
233
+ * These statistics are included in the return value of [[getTilesForUser]].
233
234
  * @internal
234
235
  */
235
- addExternalTilesForViewport(vp: Viewport, statistics: ExternalTileStatistics): void;
236
- /** Clears the sets of tiles associated with a viewport's current scene.
237
- * @internal
238
- */
239
- clearTilesForViewport(vp: Viewport): void;
240
- /** Indicates that the TileAdmin should cease tracking the specified viewport, e.g. because it is about to be destroyed.
241
- * Any requests which are of interest only to the specified viewport will be canceled.
242
- * @internal
236
+ addExternalTilesForUser(user: TileUser, statistics: ExternalTileStatistics): void;
237
+ /** Clears the sets of tiles associated with a TileUser. */
238
+ clearTilesForUser(user: TileUser): void;
239
+ /** Indicates that the TileAdmin should cease tracking the specified TileUser, e.g. because it is about to be destroyed.
240
+ * Any requests which are of interest only to the specified user will be canceled.
243
241
  */
244
- forgetViewport(vp: Viewport): void;
245
- /** Indicates that the TileAdmin should track tile requests for the specified viewport.
246
- * This is invoked by the Viewport constructor and should not be invoked from elsewhere.
247
- * @internal
242
+ forgetUser(user: TileUser): void;
243
+ /** Indicates that the TileAdmin should track tile requests for the specified TileUser.
244
+ * This is invoked by the Viewport constructor and should be invoked manually for any non-Viewport TileUser.
245
+ * [[forgetUser]] must be later invoked to unregister the user.
248
246
  */
249
- registerViewport(vp: Viewport): void;
250
- /** Iterable over all viewports registered with TileAdmin. This may include [[OffScreenViewports]].
247
+ registerUser(user: TileUser): void;
248
+ /** Iterable over all TileUsers registered with TileAdmin. This may include [[OffScreenViewports]].
251
249
  * @alpha
252
250
  */
253
- get viewports(): Iterable<Viewport>;
251
+ get tileUsers(): Iterable<TileUser>;
254
252
  /** @internal */
255
253
  invalidateAllScenes(): void;
256
254
  /** @internal */
257
255
  onShutDown(): void;
258
- /** Returns the union of the input set and the input viewport, to be associated with a [[TileRequest]].
256
+ /** Returns the union of the input set and the input TileUser, to be associated with a [[TileRequest]].
259
257
  * @internal
260
258
  */
261
- getViewportSetForRequest(vp: Viewport, vps?: ReadonlyViewportSet): ReadonlyViewportSet;
262
- /** Marks the Tile as "in use" by the specified Viewport, where the tile defines what "in use" means.
263
- * A tile will not be discarded while it is in use by any Viewport.
259
+ getTileUserSetForRequest(user: TileUser, users?: ReadonlyTileUserSet): ReadonlyTileUserSet;
260
+ /** Marks the Tile as "in use" by the specified TileUser, where the tile defines what "in use" means.
261
+ * A tile will not be discarded while it is in use by any TileUser.
264
262
  * @see [[TileTree.prune]]
265
263
  * @internal
266
264
  */
267
- markTileUsedByViewport(marker: TileUsageMarker, vp: Viewport): void;
268
- /** Returns true if the Tile is currently in use by any Viewport.
269
- * @see [[markTileUsedByViewport]].
265
+ markTileUsed(marker: TileUsageMarker, user: TileUser): void;
266
+ /** Returns true if the Tile is currently in use by any TileUser.
267
+ * @see [[markTileUsed]].
270
268
  * @internal
271
269
  */
272
270
  isTileInUse(marker: TileUsageMarker): boolean;
273
- /** Indicates that the TileAdmin should reset usage tracking for the specified viewport, e.g. because the viewport is about
274
- * to recreate its scene. Any tiles currently marked as "in use" by this viewport no longer will be.
271
+ /** Indicates that the TileAdmin should reset usage tracking for the specified TileUser, e.g. because the user is a Viewport about
272
+ * to recreate its scene. Any tiles currently marked as "in use" by this user no longer will be.
275
273
  * @internal
276
274
  */
277
- clearUsageForViewport(vp: Viewport): void;
275
+ clearUsageForUser(user: TileUser): void;
278
276
  /** @internal */
279
277
  requestTileTreeProps(iModel: IModelConnection, treeId: string): Promise<IModelTileTreeProps>;
280
278
  /** Temporary workaround for authoring applications. Usage:
@@ -345,7 +343,7 @@ export declare class TileAdmin {
345
343
  freeMemory(): void;
346
344
  private pruneAndPurge;
347
345
  private processRequests;
348
- private onViewportIModelClosed;
346
+ private onUserIModelClosed;
349
347
  private onIModelClosed;
350
348
  private initializeRpc;
351
349
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TileAdmin.d.ts","sourceRoot":"","sources":["../../../src/tile/TileAdmin.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EACG,UAAU,EAAE,OAAO,EAA8B,SAAS,EACnE,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAC8D,2BAA2B,EAC9F,mBAAmB,EAAgF,eAAe,EACnH,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAsB,MAAM,gBAAgB,CAAC;AACzE,OAAO,EACiB,cAAc,EAAe,IAAI,EAA+B,mBAAmB,EAAY,aAAa,EAAE,eAAe,EACpJ,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;IAC7B;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;IAC1B,+IAA+I;IAC/I,QAAQ,CAAC,QAAQ,EAAE,sBAAsB,CAAC;CAC3C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;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AAE,OAAO,CAAC;QAE7B;;;WAGG;QACH,8BAA8B,CAAC,EAAE,OAAO,CAAC;QAEzC;;;;;WAKG;QACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;QAEjC;;;WAGG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB;IAED;;;;OAIG;IACI,MAAM,wBAAwB;;;;KAIpC,CAAC;IAEF;;;;OAIG;IACI,MAAM,qBAAqB;;;;KAIjC,CAAC;CACH;AAED;;;;;;;;;GASG;AACH,cAAM,oBAAoB;aAIN,MAAM,EAAE,gBAAgB;IACxC,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAN1B,OAAO,CAAC,aAAa,CAAS;gBAGZ,MAAM,EAAE,gBAAgB,EACvB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,EAC9C,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI;IAGlD,IAAW,YAAY,IAAI,OAAO,CAA+B;IAE1D,QAAQ,IAAI,IAAI;IAevB;;OAEG;IACI,OAAO,IAAI,IAAI;IAOtB,OAAO,CAAC,SAAS;CAGlB;AAED,gBAAgB;AAChB,oBAAY,wBAAwB,GAAG,CAAC,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAWlH;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,wBAAwB,GAAG,SAAS,GAAG,IAAI,CAE7F"}
@@ -13,7 +13,7 @@ const core_common_1 = require("@itwin/core-common");
13
13
  const IModelApp_1 = require("../IModelApp");
14
14
  const IpcApp_1 = require("../IpcApp");
15
15
  const IModelConnection_1 = require("../IModelConnection");
16
- const ViewportSet_1 = require("../ViewportSet");
16
+ const Viewport_1 = require("../Viewport");
17
17
  const internal_1 = require("./internal");
18
18
  /** Manages [[Tile]]s and [[TileTree]]s on behalf of [[IModelApp]]. Its responsibilities include scheduling requests for tile content via a priority queue;
19
19
  * keeping track of and imposing limits upon the amount of GPU memory consumed by tiles; and notifying listeners of tile-related events.
@@ -27,11 +27,11 @@ class TileAdmin {
27
27
  */
28
28
  constructor(isMobile, rpcConcurrency, options) {
29
29
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
30
- this._viewports = new Set();
31
- this._requestsPerViewport = new Map();
32
- this._tileUsagePerViewport = new Map();
30
+ this._users = new Set();
31
+ this._requestsPerUser = new Map();
32
+ this._tileUsagePerUser = new Map();
33
33
  this._selectedAndReady = new Map();
34
- this._viewportSetsForRequests = new ViewportSet_1.UniqueViewportSets();
34
+ this._tileUserSetsForRequests = new internal_1.UniqueTileUserSets();
35
35
  this._totalElided = 0;
36
36
  this._rpcInitialized = false;
37
37
  this._tileTreePropsRequests = [];
@@ -101,7 +101,10 @@ class TileAdmin {
101
101
  // If unspecified skip one level before preloading of parents of context tiles.
102
102
  this.contextPreloadParentSkip = Math.max(0, Math.min((options.contextPreloadParentSkip === undefined ? 1 : options.contextPreloadParentSkip), 5));
103
103
  this._cleanup = this.addLoadListener(() => {
104
- this._viewports.forEach((vp) => vp.invalidateScene());
104
+ this._users.forEach((user) => {
105
+ if (user instanceof Viewport_1.Viewport)
106
+ user.invalidateScene();
107
+ });
105
108
  });
106
109
  }
107
110
  /** Create a TileAdmin suitable for passing to [[IModelApp.startup]] via [[IModelAppOptions.tileAdmin]] to customize aspects of
@@ -115,7 +118,7 @@ class TileAdmin {
115
118
  return new TileAdmin(isMobile, rpcConcurrency, props);
116
119
  }
117
120
  /** @internal */
118
- get emptyViewportSet() { return ViewportSet_1.UniqueViewportSets.emptySet; }
121
+ get emptyTileUserSet() { return internal_1.UniqueTileUserSets.emptySet; }
119
122
  /** Returns basic statistics about the TileAdmin's current state. */
120
123
  get statistics() {
121
124
  let numActiveTileTreePropsRequests = 0;
@@ -221,13 +224,13 @@ class TileAdmin {
221
224
  // Free up any additional memory as required to keep within our limit.
222
225
  this.freeMemory();
223
226
  }
224
- /** Iterate over the tiles that have content loaded but are not selected for display in any viewport.
227
+ /** Iterate over the tiles that have content loaded but are not in use by any [[TileUser]].
225
228
  * @alpha
226
229
  */
227
230
  get unselectedLoadedTiles() {
228
231
  return this._lruList.unselectedTiles;
229
232
  }
230
- /** Iterate over the tiles that have content loaded and are selected for display in any viewport.
233
+ /** Iterate over the tiles that have content loaded and are in use by any [[TileUser]].
231
234
  * @alpha
232
235
  */
233
236
  get selectedLoadedTiles() {
@@ -235,48 +238,52 @@ class TileAdmin {
235
238
  }
236
239
  /** Returns the number of pending and active requests associated with the specified viewport. */
237
240
  getNumRequestsForViewport(vp) {
241
+ return this.getNumRequestsForUser(vp);
242
+ }
243
+ /** Returns the number of pending and active requests associated with the specified user. */
244
+ getNumRequestsForUser(user) {
238
245
  var _a;
239
- const requests = this.getRequestsForViewport(vp);
246
+ const requests = this.getRequestsForUser(user);
240
247
  let count = (_a = requests === null || requests === void 0 ? void 0 : requests.size) !== null && _a !== void 0 ? _a : 0;
241
- const tiles = this.getTilesForViewport(vp);
248
+ const tiles = this.getTilesForUser(user);
242
249
  if (tiles)
243
250
  count += tiles.external.requested;
244
251
  return count;
245
252
  }
246
- /** Returns the current set of Tiles requested by the specified Viewport.
253
+ /** Returns the current set of Tiles requested by the specified TileUser.
247
254
  * Do not modify the set or the Tiles.
248
255
  * @internal
249
256
  */
250
- getRequestsForViewport(vp) {
251
- return this._requestsPerViewport.get(vp);
257
+ getRequestsForUser(user) {
258
+ return this._requestsPerUser.get(user);
252
259
  }
253
- /** Specifies the set of tiles currently requested for use by a viewport. This set replaces any previously specified for the same viewport.
260
+ /** Specifies the set of tiles currently requested for use by a TileUser. This set replaces any previously specified for the same user.
254
261
  * The requests are not actually processed until the next call to [[TileAdmin.process].
255
- * This is typically invoked when the viewport recreates its scene, e.g. in response to camera movement.
262
+ * This is typically invoked when a viewport recreates its scene, e.g. in response to camera movement.
256
263
  * @internal
257
264
  */
258
- requestTiles(vp, tiles) {
259
- this._requestsPerViewport.set(vp, tiles);
265
+ requestTiles(user, tiles) {
266
+ this._requestsPerUser.set(user, tiles);
260
267
  }
261
- /** Returns two sets of tiles associated with the specified Viewport's current scene.
268
+ /** Returns two sets of tiles associated with the specified user - typically, a viewport's current scene.
262
269
  * Do not modify the returned sets.
263
270
  * @internal
264
271
  */
265
- getTilesForViewport(vp) {
266
- return this._selectedAndReady.get(vp);
272
+ getTilesForUser(user) {
273
+ return this._selectedAndReady.get(user);
267
274
  }
268
- /** Adds the specified tiles to the sets of selected and ready tiles for the specified Viewport.
275
+ /** Adds the specified tiles to the sets of selected and ready tiles for the specified TileUser.
269
276
  * The TileAdmin takes ownership of the `ready` set - do not modify it after passing it in.
270
277
  * @internal
271
278
  */
272
- addTilesForViewport(vp, selected, ready) {
279
+ addTilesForUser(user, selected, ready) {
273
280
  // "selected" are tiles we are drawing.
274
- this._lruList.markSelectedForViewport(vp.viewportId, selected);
281
+ this._lruList.markUsed(user.tileUserId, selected);
275
282
  // "ready" are tiles we want to draw but can't yet because, for example, their siblings are not yet ready to be drawn.
276
- this._lruList.markSelectedForViewport(vp.viewportId, ready);
277
- const entry = this.getTilesForViewport(vp);
283
+ this._lruList.markUsed(user.tileUserId, ready);
284
+ const entry = this.getTilesForUser(user);
278
285
  if (undefined === entry) {
279
- this._selectedAndReady.set(vp, { ready, selected: new Set(selected), external: { selected: 0, requested: 0, ready: 0 } });
286
+ this._selectedAndReady.set(user, { ready, selected: new Set(selected), external: { selected: 0, requested: 0, ready: 0 } });
280
287
  return;
281
288
  }
282
289
  for (const tile of selected)
@@ -285,51 +292,49 @@ class TileAdmin {
285
292
  entry.ready.add(tile);
286
293
  }
287
294
  /** Disclose statistics about tiles that are handled externally from TileAdmin. At this time, that means OrbitGT point cloud tiles.
288
- * These statistics are included in the return value of [[getTilesForViewport]].
295
+ * These statistics are included in the return value of [[getTilesForUser]].
289
296
  * @internal
290
297
  */
291
- addExternalTilesForViewport(vp, statistics) {
292
- const entry = this.getTilesForViewport(vp);
298
+ addExternalTilesForUser(user, statistics) {
299
+ const entry = this.getTilesForUser(user);
293
300
  if (!entry) {
294
- this._selectedAndReady.set(vp, { ready: new Set(), selected: new Set(), external: { ...statistics } });
301
+ this._selectedAndReady.set(user, { ready: new Set(), selected: new Set(), external: { ...statistics } });
295
302
  return;
296
303
  }
297
304
  entry.external.requested += statistics.requested;
298
305
  entry.external.selected += statistics.selected;
299
306
  entry.external.ready += statistics.ready;
300
307
  }
301
- /** Clears the sets of tiles associated with a viewport's current scene.
302
- * @internal
303
- */
304
- clearTilesForViewport(vp) {
305
- this._selectedAndReady.delete(vp);
306
- this._lruList.clearSelectedForViewport(vp.viewportId);
308
+ /** Clears the sets of tiles associated with a TileUser. */
309
+ clearTilesForUser(user) {
310
+ this._selectedAndReady.delete(user);
311
+ this._lruList.clearUsed(user.tileUserId);
307
312
  }
308
- /** Indicates that the TileAdmin should cease tracking the specified viewport, e.g. because it is about to be destroyed.
309
- * Any requests which are of interest only to the specified viewport will be canceled.
310
- * @internal
313
+ /** Indicates that the TileAdmin should cease tracking the specified TileUser, e.g. because it is about to be destroyed.
314
+ * Any requests which are of interest only to the specified user will be canceled.
311
315
  */
312
- forgetViewport(vp) {
313
- this.onViewportIModelClosed(vp);
314
- this._viewports.delete(vp);
316
+ forgetUser(user) {
317
+ this.onUserIModelClosed(user);
318
+ this._users.delete(user);
315
319
  }
316
- /** Indicates that the TileAdmin should track tile requests for the specified viewport.
317
- * This is invoked by the Viewport constructor and should not be invoked from elsewhere.
318
- * @internal
320
+ /** Indicates that the TileAdmin should track tile requests for the specified TileUser.
321
+ * This is invoked by the Viewport constructor and should be invoked manually for any non-Viewport TileUser.
322
+ * [[forgetUser]] must be later invoked to unregister the user.
319
323
  */
320
- registerViewport(vp) {
321
- this._viewports.add(vp);
324
+ registerUser(user) {
325
+ this._users.add(user);
322
326
  }
323
- /** Iterable over all viewports registered with TileAdmin. This may include [[OffScreenViewports]].
327
+ /** Iterable over all TileUsers registered with TileAdmin. This may include [[OffScreenViewports]].
324
328
  * @alpha
325
329
  */
326
- get viewports() {
327
- return this._viewports;
330
+ get tileUsers() {
331
+ return this._users;
328
332
  }
329
333
  /** @internal */
330
334
  invalidateAllScenes() {
331
- for (const vp of this.viewports)
332
- vp.invalidateScene();
335
+ for (const user of this.tileUsers)
336
+ if (user instanceof Viewport_1.Viewport)
337
+ user.invalidateScene();
333
338
  }
334
339
  /** @internal */
335
340
  onShutDown() {
@@ -341,46 +346,46 @@ class TileAdmin {
341
346
  this.channels.onShutDown();
342
347
  for (const req of this._tileTreePropsRequests)
343
348
  req.abandon();
344
- this._requestsPerViewport.clear();
345
- this._viewportSetsForRequests.clear();
346
- this._tileUsagePerViewport.clear();
349
+ this._requestsPerUser.clear();
350
+ this._tileUserSetsForRequests.clear();
351
+ this._tileUsagePerUser.clear();
347
352
  this._tileTreePropsRequests.length = 0;
348
353
  this._lruList.dispose();
349
354
  }
350
- /** Returns the union of the input set and the input viewport, to be associated with a [[TileRequest]].
355
+ /** Returns the union of the input set and the input TileUser, to be associated with a [[TileRequest]].
351
356
  * @internal
352
357
  */
353
- getViewportSetForRequest(vp, vps) {
354
- return this._viewportSetsForRequests.getViewportSet(vp, vps);
358
+ getTileUserSetForRequest(user, users) {
359
+ return this._tileUserSetsForRequests.getTileUserSet(user, users);
355
360
  }
356
- /** Marks the Tile as "in use" by the specified Viewport, where the tile defines what "in use" means.
357
- * A tile will not be discarded while it is in use by any Viewport.
361
+ /** Marks the Tile as "in use" by the specified TileUser, where the tile defines what "in use" means.
362
+ * A tile will not be discarded while it is in use by any TileUser.
358
363
  * @see [[TileTree.prune]]
359
364
  * @internal
360
365
  */
361
- markTileUsedByViewport(marker, vp) {
362
- let set = this._tileUsagePerViewport.get(vp);
366
+ markTileUsed(marker, user) {
367
+ let set = this._tileUsagePerUser.get(user);
363
368
  if (!set)
364
- this._tileUsagePerViewport.set(vp, set = new Set());
369
+ this._tileUsagePerUser.set(user, set = new Set());
365
370
  set.add(marker);
366
371
  }
367
- /** Returns true if the Tile is currently in use by any Viewport.
368
- * @see [[markTileUsedByViewport]].
372
+ /** Returns true if the Tile is currently in use by any TileUser.
373
+ * @see [[markTileUsed]].
369
374
  * @internal
370
375
  */
371
376
  isTileInUse(marker) {
372
377
  // eslint-disable-next-line @typescript-eslint/naming-convention
373
- for (const [_viewport, markers] of this._tileUsagePerViewport)
378
+ for (const [_user, markers] of this._tileUsagePerUser)
374
379
  if (markers.has(marker))
375
380
  return true;
376
381
  return false;
377
382
  }
378
- /** Indicates that the TileAdmin should reset usage tracking for the specified viewport, e.g. because the viewport is about
379
- * to recreate its scene. Any tiles currently marked as "in use" by this viewport no longer will be.
383
+ /** Indicates that the TileAdmin should reset usage tracking for the specified TileUser, e.g. because the user is a Viewport about
384
+ * to recreate its scene. Any tiles currently marked as "in use" by this user no longer will be.
380
385
  * @internal
381
386
  */
382
- clearUsageForViewport(vp) {
383
- this._tileUsagePerViewport.delete(vp);
387
+ clearUsageForUser(user) {
388
+ this._tileUsagePerUser.delete(user);
384
389
  }
385
390
  /** @internal */
386
391
  async requestTileTreeProps(iModel, treeId) {
@@ -503,12 +508,12 @@ class TileAdmin {
503
508
  this._tileTreePropsRequests[i].dispatch();
504
509
  }
505
510
  processQueue() {
506
- // Mark all requests as being associated with no Viewports, indicating they are no longer needed.
507
- this._viewportSetsForRequests.clearAll();
511
+ // Mark all requests as being associated with no users, indicating they are no longer needed.
512
+ this._tileUserSetsForRequests.clearAll();
508
513
  // Notify channels that we are enqueuing new requests.
509
514
  this.channels.swapPending();
510
- // Repopulate pending requests queue from each viewport. We do NOT sort by priority while doing so.
511
- this._requestsPerViewport.forEach((value, key) => this.processRequests(key, value));
515
+ // Repopulate pending requests queue from each user. We do NOT sort by priority while doing so.
516
+ this._requestsPerUser.forEach((value, key) => this.processRequests(key, value));
512
517
  // Ask channels to update their queues and dispatch requests.
513
518
  this.channels.process();
514
519
  }
@@ -523,18 +528,18 @@ class TileAdmin {
523
528
  const needPurge = this._nextPurgeTime.before(now);
524
529
  if (!needPrune && !needPurge)
525
530
  return;
526
- // Identify all of the TileTrees being displayed by all of the Viewports known to the TileAdmin.
527
- // A single viewport can display tiles from more than one IModelConnection.
531
+ // Identify all of the TileTrees in use by all of the TileUsers known to the TileAdmin.
532
+ // NOTE: A single viewport can display tiles from more than one IModelConnection.
528
533
  // NOTE: A viewport may be displaying no trees - but we need to record its IModel so we can purge those which are NOT being displayed
529
534
  // NOTE: That won't catch external tile trees previously used by that viewport.
530
535
  const trees = new internal_1.DisclosedTileTreeSet();
531
536
  const treesByIModel = needPurge ? new Map() : undefined;
532
- for (const vp of this._viewports) {
533
- if (!vp.iModel.isOpen) // case of closing an IModelConnection while keeping the Viewport open, possibly for reuse with a different IModelConnection.
537
+ for (const user of this._users) {
538
+ if (!user.iModel.isOpen) // case of closing an IModelConnection while keeping the Viewport open, possibly for reuse with a different IModelConnection.
534
539
  continue;
535
- vp.discloseTileTrees(trees);
536
- if (treesByIModel && undefined === treesByIModel.get(vp.iModel))
537
- treesByIModel.set(vp.iModel, new Set());
540
+ user.discloseTileTrees(trees);
541
+ if (treesByIModel && undefined === treesByIModel.get(user.iModel))
542
+ treesByIModel.set(user.iModel, new Set());
538
543
  }
539
544
  if (needPrune) {
540
545
  // Request that each displayed tile tree discard any tiles and/or tile content that is no longer needed.
@@ -549,21 +554,21 @@ class TileAdmin {
549
554
  treesByIModel.set(tree.iModel, set = new Set());
550
555
  set.add(tree);
551
556
  }
552
- // Discard any tile trees that are no longer in use by any viewport.
557
+ // Discard any tile trees that are no longer in use by any user.
553
558
  const olderThan = now.minus(this.tileTreeExpirationTime);
554
559
  for (const entry of treesByIModel)
555
560
  entry[0].tiles.purge(olderThan, entry[1]);
556
561
  this._nextPurgeTime = now.plus(this.tileTreeExpirationTime);
557
562
  }
558
563
  }
559
- processRequests(vp, tiles) {
564
+ processRequests(user, tiles) {
560
565
  for (const tile of tiles) {
561
566
  if (undefined === tile.request) {
562
567
  // ###TODO: This assertion triggers for AttachmentViewports used for rendering 3d sheet attachments.
563
568
  // Determine why and fix.
564
569
  // assert(tile.loadStatus === Tile.LoadStatus.NotLoaded);
565
570
  if (internal_1.TileLoadStatus.NotLoaded === tile.loadStatus) {
566
- const request = new internal_1.TileRequest(tile, vp);
571
+ const request = new internal_1.TileRequest(tile, user);
567
572
  tile.request = request;
568
573
  (0, core_bentley_1.assert)(this.channels.has(request.channel));
569
574
  request.channel.append(request);
@@ -574,33 +579,33 @@ class TileAdmin {
574
579
  (0, core_bentley_1.assert)(undefined !== req);
575
580
  if (undefined !== req) {
576
581
  // Request may already be dispatched (in channel's active requests) - if so do not re-enqueue!
577
- if (req.isQueued && 0 === req.viewports.length)
582
+ if (req.isQueued && 0 === req.users.length)
578
583
  req.channel.append(req);
579
- req.addViewport(vp);
580
- (0, core_bentley_1.assert)(0 < req.viewports.length);
584
+ req.addUser(user);
585
+ (0, core_bentley_1.assert)(0 < req.users.length);
581
586
  }
582
587
  }
583
588
  }
584
589
  }
585
- // NB: This does *not* remove from this._viewports - the viewport could later be reused with a different IModelConnection.
586
- onViewportIModelClosed(vp) {
587
- this.clearUsageForViewport(vp);
588
- this.clearTilesForViewport(vp);
589
- // NB: vp will be removed from ViewportSets in process() - but if we can establish that only this vp wants a given tile, cancel its request immediately.
590
- const tiles = this._requestsPerViewport.get(vp);
590
+ // NB: This does *not* remove from this._users - a viewport could later be reused with a different IModelConnection.
591
+ onUserIModelClosed(user) {
592
+ this.clearUsageForUser(user);
593
+ this.clearTilesForUser(user);
594
+ // NB: user will be removed from TileUserSets in process() - but if we can establish that only this user wants a given tile, cancel its request immediately.
595
+ const tiles = this._requestsPerUser.get(user);
591
596
  if (undefined !== tiles) {
592
597
  for (const tile of tiles) {
593
598
  const request = tile.request;
594
- if (undefined !== request && 1 === request.viewports.length)
599
+ if (undefined !== request && 1 === request.users.length)
595
600
  request.cancel();
596
601
  }
597
- this._requestsPerViewport.delete(vp);
602
+ this._requestsPerUser.delete(user);
598
603
  }
599
604
  }
600
605
  onIModelClosed(iModel) {
601
- this._requestsPerViewport.forEach((_req, vp) => {
602
- if (vp.iModel === iModel)
603
- this.onViewportIModelClosed(vp);
606
+ this._requestsPerUser.forEach((_req, user) => {
607
+ if (user.iModel === iModel)
608
+ this.onUserIModelClosed(user);
604
609
  });
605
610
  // Remove any TileTreeProps requests associated with this iModel.
606
611
  this._tileTreePropsRequests = this._tileTreePropsRequests.filter((req) => {