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() {
|
componentDidMount() {
|
||||||
if (this.fireMap) {
|
if (this.fireMap) {
|
||||||
if (this.getMap().getCenter()) {
|
this.addScale();
|
||||||
const bounds = this.getMap().getBounds();
|
|
||||||
mapSize.set([bounds.getNorthEast(), bounds.getSouthWest()]);
|
|
||||||
this.addScale();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -118,6 +114,8 @@ class FiresMap extends React.Component {
|
||||||
// console.log('Map loading');
|
// console.log('Map loading');
|
||||||
// console.log(map);
|
// console.log(map);
|
||||||
if (map) {
|
if (map) {
|
||||||
|
const bounds = this.getMap().getBounds();
|
||||||
|
mapSize.set([bounds.getNorthEast(), bounds.getSouthWest()]);
|
||||||
this.state.union = subsUnion(this.state.union, {
|
this.state.union = subsUnion(this.state.union, {
|
||||||
map,
|
map,
|
||||||
subs: this.props.userSubs,
|
subs: this.props.userSubs,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue