summaryrefslogtreecommitdiff
path: root/static/js/bundle.js
diff options
context:
space:
mode:
authorYuval Adam <yuval@y3xz.com>2016-01-02 01:23:14 +0200
committerYuval Adam <yuval@y3xz.com>2016-01-02 01:23:14 +0200
commit7831cf281921fdab1ac652528451100bf3479206 (patch)
tree934ddb317c083207bc930e317d6e73a170cf8dc5 /static/js/bundle.js
parent8ffcc2bbd0460616495d18feb74763f31a459c1d (diff)
Render imgs into global state
Diffstat (limited to 'static/js/bundle.js')
-rw-r--r--static/js/bundle.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/static/js/bundle.js b/static/js/bundle.js
index bb4f28b..f94c182 100644
--- a/static/js/bundle.js
+++ b/static/js/bundle.js
@@ -86,8 +86,17 @@
}
_createClass(GLMap, [{
- key: 'componentDidMount',
+ key: 'getInitialState',
// mapbox auth token
+ value: function getInitialState() {
+ return window.imgs;
+ }
+
+ // Adapted from Tim Welch's code that can be found at
+ // https://github.com/twelch/react-mapbox-gl-seed/blob/4d78eb0/src/components/GLMap.js
+
+ }, {
+ key: 'componentDidMount',
value: function componentDidMount() {
var _this2 = this;
@@ -127,10 +136,6 @@
});
});
}
-
- // Adapted from Tim Welch's code that can be found at
- // https://github.com/twelch/react-mapbox-gl-seed/blob/4d78eb0/src/components/GLMap.js
-
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
@@ -248,7 +253,7 @@
_react2.default.createElement(GLMap, {
view: view,
token: 'pk.eyJ1IjoieXV2YWRtIiwiYSI6ImNpaWRuaWFxazAwMTJ2b2tyZGRmaWpsNWYifQ.qf_V3CFP_NZtLjk5luNM4g' }),
- _react2.default.createElement(_rcSlider2.default, { step: 2, defaultValue: 50 })
+ _react2.default.createElement(_rcSlider2.default, { step: 1, min: 1, max: 7, defaultValue: 7 })
);
}
}]);