Make followZoom optional
This commit is contained in:
parent
b3f186a197
commit
8151dfaab5
@ -322,7 +322,7 @@ export default defineComponent({
|
||||
if(map !== store.state.currentMap && (targetWorld !== currentWorld || newFollow)) {
|
||||
this.scheduledPan = player.location;
|
||||
|
||||
if(newFollow) {
|
||||
if(newFollow && store.state.configuration.followZoom) {
|
||||
console.log(`Setting zoom for new follow ${store.state.configuration.followZoom}`);
|
||||
this.scheduledZoom = store.state.configuration.followZoom;
|
||||
}
|
||||
@ -332,7 +332,7 @@ export default defineComponent({
|
||||
} else {
|
||||
this.leaflet!.panTo(store.state.currentMap?.locationToLatLng(player.location));
|
||||
|
||||
if(newFollow) {
|
||||
if(newFollow && store.state.configuration.followZoom) {
|
||||
console.log(`Setting zoom for new follow ${store.state.configuration.followZoom}`);
|
||||
this.leaflet!.setZoom(store.state.configuration.followZoom);
|
||||
}
|
||||
|
2
src/index.d.ts
vendored
2
src/index.d.ts
vendored
@ -241,7 +241,7 @@ interface LiveAtlasServerConfig {
|
||||
defaultWorld?: string;
|
||||
defaultZoom: number;
|
||||
followMap?: string;
|
||||
followZoom: number;
|
||||
followZoom?: number;
|
||||
title: string;
|
||||
grayHiddenPlayers: boolean;
|
||||
expandUI: boolean;
|
||||
|
@ -60,7 +60,7 @@ export default class DynmapMapProvider extends MapProvider {
|
||||
defaultWorld: response.defaultworld || undefined,
|
||||
defaultZoom: response.defaultzoom || 0,
|
||||
followMap: response.followmap || undefined,
|
||||
followZoom: response.followzoom || 0,
|
||||
followZoom: response.followzoom,
|
||||
title: response.title.replace(titleColoursRegex, '') || 'Dynmap',
|
||||
expandUI: response.sidebaropened && response.sidebaropened !== 'false', //Sent as a string for some reason
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user