Skip to content

Commit 5bdeffc

Browse files
committed
rename
Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
1 parent 56c3298 commit 5bdeffc

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/components/src/map-container.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ export default function MapContainerFactory(
525525
} as Partial<LayerBaseConfig>);
526526
};
527527

528-
_onForceUpdate = () => {
528+
_onRedrawNeeded = (_idx: number) => {
529529
// Force a map re-render by triggering a minimal map state update
530530
const {mapStateActions, mapState, index} = this.props;
531531
mapStateActions.updateMap({width: mapState.width, height: mapState.height}, index);
@@ -848,7 +848,7 @@ export default function MapContainerFactory(
848848
onSetLayerDomain: this._onLayerSetDomain,
849849
onFilteredItemsChange: this._onLayerFilteredItemsChange,
850850
onWMSFeatureInfo: this._onWMSFeatureInfo,
851-
onForceUpdate: this._onForceUpdate
851+
onRedrawNeeded: this._onRedrawNeeded
852852
},
853853
deckGlProps
854854
);

src/layers/src/icon-layer/icon-layer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export default class IconLayer extends Layer {
113113
_layerInfoModal: () => JSX.Element;
114114
iconGeometry: IconGeometry;
115115
iconGeometryVersion: number;
116-
protected forceUpdate: BindedLayerCallbacks['onForceUpdate'] = undefined;
116+
protected redrawNeeded: BindedLayerCallbacks['onRedrawNeeded'] = undefined;
117117

118118
declare visConfigSettings: IconLayerVisConfigSettings;
119119
declare config: IconLayerConfig;
@@ -250,7 +250,7 @@ export default class IconLayer extends Layer {
250250
this._layerInfoModal = IconInfoModalFactory(svgIcons);
251251

252252
// Trigger a map redraw so deck.gl picks up the new geometry
253-
this.forceUpdate?.();
253+
this.redrawNeeded?.();
254254
}
255255

256256
static findDefaultLayerProps({
@@ -369,7 +369,7 @@ export default class IconLayer extends Layer {
369369
const {data, gpuFilter, objectHovered, mapState, interactionConfig, layerCallbacks} = opts;
370370

371371
// Store callback to trigger map redraw when icon geometry loads asynchronously
372-
this.forceUpdate = layerCallbacks?.onForceUpdate;
372+
this.redrawNeeded = layerCallbacks?.onRedrawNeeded;
373373

374374
const radiusScale = this.getRadiusScaleByZoom(mapState);
375375

src/types/layers.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ export type LayerCallbacks = {
426426
coordinate?: [number, number] | null;
427427
}
428428
) => void;
429-
onForceUpdate?: (idx: number) => void;
429+
onRedrawNeeded?: (idx: number) => void;
430430
};
431431

432432
export type BindedLayerCallbacks = {
@@ -437,7 +437,7 @@ export type BindedLayerCallbacks = {
437437
featureInfo: Array<{name: string; value: string}> | string | null,
438438
coordinate?: [number, number]
439439
) => void;
440-
onForceUpdate?: () => void;
440+
onRedrawNeeded?: () => void;
441441
};
442442

443443
export type VisualChannelAggregation = 'colorAggregation' | 'sizeAggregation';

0 commit comments

Comments
 (0)