Fix URL zoom being ignored on initial load (Fixes #59)
This commit is contained in:
parent
ea9687b6ef
commit
f5002ed828
@ -178,6 +178,11 @@ export default defineComponent({
|
||||
// Otherwise pan to url location, if present
|
||||
} else if(store.state.parsedUrl?.location) {
|
||||
location = store.state.parsedUrl.location;
|
||||
|
||||
if(!oldValue) {
|
||||
this.scheduledZoom = store.state.parsedUrl?.zoom || store.state.configuration.defaultZoom;
|
||||
}
|
||||
|
||||
store.commit(MutationTypes.CLEAR_PARSED_URL, undefined);
|
||||
// Otherwise pan to world center
|
||||
} else {
|
||||
@ -185,7 +190,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
if(!oldValue) {
|
||||
this.scheduledZoom = store.state.parsedUrl?.zoom || store.state.configuration.defaultZoom;
|
||||
this.scheduledZoom = this.scheduledZoom || store.state.configuration.defaultZoom;
|
||||
}
|
||||
|
||||
//Set pan location for when the projection changes
|
||||
|
Loading…
Reference in New Issue
Block a user