summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <yuval@y3xz.com>2016-01-09 20:56:18 +0200
committerYuval Adam <yuval@y3xz.com>2016-01-09 20:56:18 +0200
commitb5ff42cf15fd19002c00e228be5b8b336c754f21 (patch)
treea5087c6c78f385d2592fcfbee62c3286ff583f36
parentd33faf83edccefd22e5564b9ab2c1f63291a7ebe (diff)
Remove leftover layer opacity code
-rw-r--r--geshem.js13
-rw-r--r--static/js/bundle.js13
2 files changed, 0 insertions, 26 deletions
diff --git a/geshem.js b/geshem.js
index 4e52fd3..285f298 100644
--- a/geshem.js
+++ b/geshem.js
@@ -61,9 +61,6 @@ class GLMap extends React.Component {
"paint": {
"raster-opacity": 0.85
}
- // "layout": {
- // "visibility": "none"
- // }
})
}
@@ -78,8 +75,6 @@ class GLMap extends React.Component {
this.map.on('zoom', (e) => {
if (this.map.getZoom() > 7) {
- // this.map.setPaintProperty('radar-140-' + this.state.slider, 'raster-opacity', 0.85)
- // this.map.setPaintProperty('radar-280-' + this.state.slider, 'raster-opacity', 0)
this._removeRadarLayer('280', this.state.slider)
this._addRadarLayer('140', this.state.slider)
this.setState({
@@ -88,8 +83,6 @@ class GLMap extends React.Component {
})
}
else {
- // this.map.setPaintProperty('radar-140-' + this.state.slider, 'raster-opacity', 0)
- // this.map.setPaintProperty('radar-280-' + this.state.slider, 'raster-opacity', 0.85)
this._removeRadarLayer('140', this.state.slider)
this._addRadarLayer('280', this.state.slider)
this.setState({
@@ -103,23 +96,17 @@ class GLMap extends React.Component {
var i = 0;
for (let v of window.imgs['140']) {
this._addRadarSource('140', i++, v)
- // this._addRadarLayer('140', i++)
}
i = 0;
for (let v of window.imgs['280']) {
this._addRadarSource('280', i++, v)
- // this._addRadarLayer('280', i++)
}
- // this.map.setPaintProperty('radar-280-0', 'raster-opacity', 0.85)
this._addRadarLayer('280', '0')
})
}
componentWillReceiveProps (props) {
- // 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._removeRadarLayer(this.state.res, this.state.slider)
this._addRadarLayer(this.state.res, props.slider)
diff --git a/static/js/bundle.js b/static/js/bundle.js
index 4c18844..b17fe0d 100644
--- a/static/js/bundle.js
+++ b/static/js/bundle.js
@@ -121,9 +121,6 @@
"paint": {
"raster-opacity": 0.85
}
- // "layout": {
- // "visibility": "none"
- // }
});
}
}, {
@@ -142,8 +139,6 @@
this.map.on('zoom', function (e) {
if (_this2.map.getZoom() > 7) {
- // this.map.setPaintProperty('radar-140-' + this.state.slider, 'raster-opacity', 0.85)
- // this.map.setPaintProperty('radar-280-' + this.state.slider, 'raster-opacity', 0)
_this2._removeRadarLayer('280', _this2.state.slider);
_this2._addRadarLayer('140', _this2.state.slider);
_this2.setState({
@@ -151,8 +146,6 @@
'slider': _this2.state.slider
});
} else {
- // this.map.setPaintProperty('radar-140-' + this.state.slider, 'raster-opacity', 0)
- // this.map.setPaintProperty('radar-280-' + this.state.slider, 'raster-opacity', 0.85)
_this2._removeRadarLayer('140', _this2.state.slider);
_this2._addRadarLayer('280', _this2.state.slider);
_this2.setState({
@@ -173,7 +166,6 @@
var v = _step.value;
_this2._addRadarSource('140', i++, v);
- // this._addRadarLayer('140', i++)
}
} catch (err) {
_didIteratorError = true;
@@ -200,9 +192,7 @@
var v = _step2.value;
_this2._addRadarSource('280', i++, v);
- // this._addRadarLayer('280', i++)
}
- // this.map.setPaintProperty('radar-280-0', 'raster-opacity', 0.85)
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
@@ -224,9 +214,6 @@
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(props) {
- // 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._removeRadarLayer(this.state.res, this.state.slider);
this._addRadarLayer(this.state.res, props.slider);