Another attemt to fix zooming
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
This commit is contained in:
parent
3a38c24360
commit
c341b3e42f
@ -130,7 +130,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
this.selectedFeatures$.next(null);
|
||||
this.query$.pipe(withLatestFrom(this.mapState$),withLatestFrom(this.setStateCount$)).subscribe((state) => {
|
||||
if(state[1]>0) this.replaceUrl(state[0][1], state[0][0],false);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
initCustomStyles() {
|
||||
@ -182,6 +182,8 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
}
|
||||
queryStateChanged = this.serializeService.serialize(lastQueryState) != queryState;
|
||||
}
|
||||
let t =0;
|
||||
if(setStateCount==0) t=600;
|
||||
setTimeout(() => {
|
||||
this.zone.run(()=> {
|
||||
if ( queryStateChanged && mapStateChanged) {
|
||||
@ -195,12 +197,12 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
this.store.dispatch(new mapActions.SetMapState(newMapState));
|
||||
}
|
||||
})
|
||||
},0);
|
||||
},t);
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.map.instance.updateSize();
|
||||
}, 500);
|
||||
console.debug("Afterviewinit");
|
||||
console.debug("Afterviewinit");
|
||||
}
|
||||
|
||||
handleSearchCollapse(event) {
|
||||
|
Loading…
Reference in New Issue
Block a user