Skip to content

Commit ef23725

Browse files
fix color changing when zooming
1 parent f091217 commit ef23725

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/HeatmapLayer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ exports.default = (0, _reactLeaflet.withLeaflet)((_temp = _class = function (_Ma
313313

314314
var maxZoom = this.props.maxZoom === undefined ? this.props.leaflet.map.getMaxZoom() : this.getMaxZoom(this.props);
315315

316-
var v = 1 / Math.pow(2, Math.max(0, Math.min(maxZoom - this.props.leaflet.map.getZoom(), 12)));
316+
var v = 1 / Math.pow(2, Math.max(0, Math.min(maxZoom - this.props.leaflet.map.getZoom(), 12)) / 2);
317317

318318
var cellSize = r / 2;
319319
var panePos = this.props.leaflet.map._getMapPanePos();

src/HeatmapLayer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ export default withLeaflet(class HeatmapLayer extends MapLayer {
307307

308308
const v = 1 / Math.pow(
309309
2,
310-
Math.max(0, Math.min(maxZoom - this.props.leaflet.map.getZoom(), 12))
310+
Math.max(0, Math.min(maxZoom - this.props.leaflet.map.getZoom(), 12)) / 2
311311
);
312312

313313
const cellSize = r / 2;

0 commit comments

Comments
 (0)