@gisatcz/deckgl-geolib 1.12.0-dev.2 → 1.12.0-dev.4
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/cjs/index.js +13 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.min.js +1 -1
- package/dist/cjs/index.min.js.map +1 -1
- package/dist/cjs/types/cogbitmaplayer/CogBitmapLayer.d.ts +1 -3
- package/dist/esm/index.js +13 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.min.js +3 -3
- package/dist/esm/index.min.js.map +1 -1
- package/dist/esm/types/cogbitmaplayer/CogBitmapLayer.d.ts +1 -3
- package/package.json +1 -1
- package/src/cogbitmaplayer/CogBitmapLayer.ts +14 -2
package/dist/cjs/index.js
CHANGED
|
@@ -5883,6 +5883,7 @@ class CogBitmapLayer extends core.CompositeLayer {
|
|
|
5883
5883
|
});
|
|
5884
5884
|
}
|
|
5885
5885
|
updateState({ props, oldProps }) {
|
|
5886
|
+
var _a, _b, _c;
|
|
5886
5887
|
const rasterDataChanged = props.rasterData !== oldProps.rasterData;
|
|
5887
5888
|
if (rasterDataChanged) {
|
|
5888
5889
|
const { rasterData } = props;
|
|
@@ -5897,6 +5898,14 @@ class CogBitmapLayer extends core.CompositeLayer {
|
|
|
5897
5898
|
// || props.elevationDecoder !== oldProps.elevationDecoder
|
|
5898
5899
|
|| props.bounds !== oldProps.bounds;
|
|
5899
5900
|
if (!this.state.isTiled && shouldReload) ;
|
|
5901
|
+
// Update the useChannel option for bitmapCogTiles when cogBitmapOptions.useChannel changes.
|
|
5902
|
+
// This ensures that the correct channel is used for rendering, but directly modifying the state
|
|
5903
|
+
// object in this way is not ideal and may need refactoring in the future to follow a more
|
|
5904
|
+
// declarative state management approach. Consider revisiting this if additional properties
|
|
5905
|
+
// need to be synchronized or if the state structure changes.
|
|
5906
|
+
if (((_a = props === null || props === void 0 ? void 0 : props.cogBitmapOptions) === null || _a === void 0 ? void 0 : _a.useChannel) && (((_b = props.cogBitmapOptions) === null || _b === void 0 ? void 0 : _b.useChannel) !== ((_c = oldProps.cogBitmapOptions) === null || _c === void 0 ? void 0 : _c.useChannel))) {
|
|
5907
|
+
this.state.bitmapCogTiles.options.useChannel = props.cogBitmapOptions.useChannel;
|
|
5908
|
+
}
|
|
5900
5909
|
// TODO - remove in v9
|
|
5901
5910
|
// @ts-ignore
|
|
5902
5911
|
if (props.workerUrl) {
|
|
@@ -5941,13 +5950,15 @@ class CogBitmapLayer extends core.CompositeLayer {
|
|
|
5941
5950
|
getTileData: this.getTiledBitmapData.bind(this),
|
|
5942
5951
|
renderSubLayers: this.renderSubLayers.bind(this),
|
|
5943
5952
|
updateTriggers: {
|
|
5944
|
-
getTileData:
|
|
5953
|
+
getTileData: [
|
|
5945
5954
|
// rasterData: urlTemplateToUpdateTrigger(rasterData),
|
|
5946
5955
|
// blurredTexture,
|
|
5947
5956
|
// opacity,
|
|
5948
5957
|
// cogBitmapOptions,
|
|
5949
5958
|
clampToTerrain,
|
|
5950
|
-
|
|
5959
|
+
cogBitmapOptions.useChannel,
|
|
5960
|
+
],
|
|
5961
|
+
// renderSubLayers: [cogBitmapOptions],
|
|
5951
5962
|
},
|
|
5952
5963
|
extent: this.state.bitmapCogTiles.getBoundsAsLatLon(),
|
|
5953
5964
|
tileSize,
|