FiresMap refactor

This commit is contained in:
vjrj 2018-01-31 10:57:12 +01:00
parent 68aba3b9c1
commit eafebf9d2a

View file

@ -60,11 +60,7 @@ class FiresMap extends React.Component {
componentDidMount() {
if (this.fireMap) {
if (this.getMap().getCenter()) {
const bounds = this.getMap().getBounds();
mapSize.set([bounds.getNorthEast(), bounds.getSouthWest()]);
this.addScale();
}
this.addScale();
}
}
@ -118,6 +114,8 @@ class FiresMap extends React.Component {
// console.log('Map loading');
// console.log(map);
if (map) {
const bounds = this.getMap().getBounds();
mapSize.set([bounds.getNorthEast(), bounds.getSouthWest()]);
this.state.union = subsUnion(this.state.union, {
map,
subs: this.props.userSubs,