Skip to content

Commit 7698d52

Browse files
committed
Change signature to take a argument to support passing from and from
1 parent ee41c88 commit 7698d52

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 0.2.2 Release
2+
- Change `getHeatmapProps` signature to take a `props` argument to support passing `nextProps` from `componentWillReceiveProps` and `this.props` from `componentDidMount`
3+
14
# 0.2.1 Release
25

36
- Fix getMaxZoom returning props.radius instead of props.maxZoom, fix misnamed call to getMax instead of getMaxZoom in redraw()

src/HeatmapLayer.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export default class HeatmapLayer extends MapLayer {
9797
}
9898

9999
this.attachEvents();
100-
this.updateHeatmapProps(this.getHeatmapProps());
100+
this.updateHeatmapProps(this.getHeatmapProps(this.props));
101101
this.reset();
102102
}
103103

@@ -121,14 +121,14 @@ export default class HeatmapLayer extends MapLayer {
121121
return props.blur || 15;
122122
}
123123

124-
getHeatmapProps() {
124+
getHeatmapProps(props) {
125125
return {
126-
minOpacity: this.getMinOpacity(this.props),
127-
maxZoom: this.getMaxZoom(this.props),
128-
radius: this.getRadius(this.props),
129-
blur: this.getBlur(this.props),
130-
max: this.getMax(this.props),
131-
gradient: this.props.gradient
126+
minOpacity: this.getMinOpacity(props),
127+
maxZoom: this.getMaxZoom(props),
128+
radius: this.getRadius(props),
129+
blur: this.getBlur(props),
130+
max: this.getMax(props),
131+
gradient: props.gradient
132132
};
133133
}
134134

0 commit comments

Comments
 (0)