summaryrefslogtreecommitdiff
path: root/static/js/bundle.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/js/bundle.js')
-rw-r--r--static/js/bundle.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/static/js/bundle.js b/static/js/bundle.js
index 7cf4f57..80b017b 100644
--- a/static/js/bundle.js
+++ b/static/js/bundle.js
@@ -204,23 +204,22 @@
}
}
}
+
+ _this2.map.setPaintProperty('radar-280-0', 'raster-opacity', 0.85);
});
}
}, {
key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps() {
+ value: function componentWillReceiveProps(props) {
+ console.log('old' + this.state.slider, 'new' + props.slider);
this.map.setPaintProperty('radar-' + this.state.res + '-' + this.state.slider, 'raster-opacity', 0);
+ this.map.setPaintProperty('radar-' + this.state.res + '-' + props.slider, 'raster-opacity', 0.85);
this.setState({
'res': this.state.res,
- 'slider': this.props.slider
+ 'slider': props.slider
});
}
}, {
- key: 'componentDidUpdate',
- value: function componentDidUpdate() {
- this.map.setPaintProperty('radar-' + this.state.res + '-' + this.state.slider, 'raster-opacity', 0.85);
- }
- }, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.map.remove();
@@ -248,6 +247,7 @@
var _this3 = _possibleConstructorReturn(this, Object.getPrototypeOf(Map).call(this, props));
_this3.onChangeHandler = function (e) {
+ console.log('handle', e);
_this3.setState({
'slider': 7 - e
});