@deck.gl/geo-layers 9.0.29 → 9.0.30
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/dist/dist.dev.js +4 -4
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +2 -2
- package/dist/tileset-2d/tileset-2d.js +5 -5
- package/dist.min.js +1 -1
- package/package.json +2 -2
- package/src/tileset-2d/tileset-2d.ts +5 -5
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "deck.gl layers supporting geospatial use cases and GIS formats",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"version": "9.0.
|
|
6
|
+
"version": "9.0.30",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"@luma.gl/core": "~9.0.0",
|
|
65
65
|
"@luma.gl/engine": "~9.0.0"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "255576946233ccf28f6e1a7709f9360d06ca64a2"
|
|
68
68
|
}
|
|
@@ -147,7 +147,7 @@ export class Tileset2D {
|
|
|
147
147
|
|
|
148
148
|
this.onTileLoad = tile => {
|
|
149
149
|
this.opts.onTileLoad?.(tile);
|
|
150
|
-
if (this.opts.maxCacheByteSize) {
|
|
150
|
+
if (this.opts.maxCacheByteSize != null) {
|
|
151
151
|
this._cacheByteSize += tile.byteLength;
|
|
152
152
|
this._resizeCache();
|
|
153
153
|
}
|
|
@@ -469,10 +469,10 @@ export class Tileset2D {
|
|
|
469
469
|
const {_cache, opts} = this;
|
|
470
470
|
|
|
471
471
|
const maxCacheSize =
|
|
472
|
-
opts.maxCacheSize
|
|
472
|
+
opts.maxCacheSize ??
|
|
473
473
|
// @ts-expect-error called only when selectedTiles is initialized
|
|
474
|
-
(opts.maxCacheByteSize ? Infinity : DEFAULT_CACHE_SCALE * this.selectedTiles.length);
|
|
475
|
-
const maxCacheByteSize = opts.maxCacheByteSize
|
|
474
|
+
(opts.maxCacheByteSize != null ? Infinity : DEFAULT_CACHE_SCALE * this.selectedTiles.length);
|
|
475
|
+
const maxCacheByteSize = opts.maxCacheByteSize ?? Infinity;
|
|
476
476
|
|
|
477
477
|
const overflown = _cache.size > maxCacheSize || this._cacheByteSize > maxCacheByteSize;
|
|
478
478
|
|
|
@@ -480,7 +480,7 @@ export class Tileset2D {
|
|
|
480
480
|
for (const [id, tile] of _cache) {
|
|
481
481
|
if (!tile.isVisible && !tile.isSelected) {
|
|
482
482
|
// delete tile
|
|
483
|
-
this._cacheByteSize -= opts.maxCacheByteSize ? tile.byteLength : 0;
|
|
483
|
+
this._cacheByteSize -= opts.maxCacheByteSize != null ? tile.byteLength : 0;
|
|
484
484
|
_cache.delete(id);
|
|
485
485
|
this.opts.onTileUnload?.(tile);
|
|
486
486
|
}
|