Fix zoom level 0 being ignored in url and map default zoom
This commit is contained in:
parent
89617f61a4
commit
980141ccba
@ -189,7 +189,13 @@ export default defineComponent({
|
||||
location = store.state.parsedUrl.location;
|
||||
|
||||
if(!oldValue) {
|
||||
this.scheduledZoom = store.state.parsedUrl?.zoom || newValue.defaultZoom || store.state.configuration.defaultZoom;
|
||||
if(typeof store.state.parsedUrl?.zoom !== 'undefined') {
|
||||
this.scheduledZoom = store.state.parsedUrl?.zoom;
|
||||
} else if(typeof newValue.defaultZoom !== 'undefined') {
|
||||
this.scheduledZoom = newValue.defaultZoom;
|
||||
} else {
|
||||
this.scheduledZoom = store.state.configuration.defaultZoom;
|
||||
}
|
||||
}
|
||||
|
||||
store.commit(MutationTypes.CLEAR_PARSED_URL, undefined);
|
||||
@ -198,7 +204,13 @@ export default defineComponent({
|
||||
location = newValue.center;
|
||||
}
|
||||
|
||||
this.scheduledZoom = this.scheduledZoom || newValue.defaultZoom || store.state.configuration.defaultZoom;
|
||||
if(typeof this.scheduledZoom === 'undefined') {
|
||||
if(typeof newValue.defaultZoom !== 'undefined') {
|
||||
this.scheduledZoom = newValue.defaultZoom;
|
||||
} else {
|
||||
this.scheduledZoom = store.state.configuration.defaultZoom;
|
||||
}
|
||||
}
|
||||
|
||||
//Set pan location for when the projection changes
|
||||
this.scheduledPan = location;
|
||||
|
Loading…
Reference in New Issue
Block a user