Another attemt to fix zooming
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good

This commit is contained in:
Willem Dantuma 2020-02-21 00:51:10 +01:00
parent 3a38c24360
commit c341b3e42f

View File

@ -182,6 +182,8 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
} }
queryStateChanged = this.serializeService.serialize(lastQueryState) != queryState; queryStateChanged = this.serializeService.serialize(lastQueryState) != queryState;
} }
let t =0;
if(setStateCount==0) t=600;
setTimeout(() => { setTimeout(() => {
this.zone.run(()=> { this.zone.run(()=> {
if ( queryStateChanged && mapStateChanged) { if ( queryStateChanged && mapStateChanged) {
@ -195,7 +197,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
this.store.dispatch(new mapActions.SetMapState(newMapState)); this.store.dispatch(new mapActions.SetMapState(newMapState));
} }
}) })
},0); },t);
}); });
setTimeout(() => { setTimeout(() => {
this.map.instance.updateSize(); this.map.instance.updateSize();