Handle pl3xmap world default zoom
This commit is contained in:
parent
2ab03f8fde
commit
cbd6c7f3b9
@ -189,7 +189,7 @@ export default defineComponent({
|
||||
location = store.state.parsedUrl.location;
|
||||
|
||||
if(!oldValue) {
|
||||
this.scheduledZoom = store.state.parsedUrl?.zoom || store.state.configuration.defaultZoom;
|
||||
this.scheduledZoom = store.state.parsedUrl?.zoom || newValue.defaultZoom || store.state.configuration.defaultZoom;
|
||||
}
|
||||
|
||||
store.commit(MutationTypes.CLEAR_PARSED_URL, undefined);
|
||||
@ -198,7 +198,7 @@ export default defineComponent({
|
||||
location = newValue.center;
|
||||
}
|
||||
|
||||
this.scheduledZoom = this.scheduledZoom || store.state.configuration.defaultZoom;
|
||||
this.scheduledZoom = this.scheduledZoom || newValue.defaultZoom || store.state.configuration.defaultZoom;
|
||||
|
||||
//Set pan location for when the projection changes
|
||||
this.scheduledPan = location;
|
||||
|
1
src/index.d.ts
vendored
1
src/index.d.ts
vendored
@ -182,6 +182,7 @@ interface LiveAtlasWorldDefinition {
|
||||
displayName: string;
|
||||
dimension: LiveAtlasDimension;
|
||||
center: Coordinate;
|
||||
defaultZoom?: number;
|
||||
maps: Map<string, LiveAtlasMapDefinition>;
|
||||
}
|
||||
|
||||
|
@ -150,6 +150,7 @@ export default class Pl3xmapMapProvider extends MapProvider {
|
||||
dimension,
|
||||
seaLevel: 0,
|
||||
center: {x: worldResponse.spawn.x, y: 0, z: worldResponse.spawn.z},
|
||||
defaultZoom: worldResponse.zoom.def || 1,
|
||||
maps,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user