FiresMap refactor
This commit is contained in:
parent
68aba3b9c1
commit
eafebf9d2a
1 changed files with 3 additions and 5 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue