diff --git a/src/components/Map.vue b/src/components/Map.vue index 3a6e1b1..4db106f 100644 --- a/src/components/Map.vue +++ b/src/components/Map.vue @@ -204,8 +204,6 @@ export default defineComponent({ viewTarget.zoom = store.state.parsedUrl?.zoom; } else if(typeof store.state.currentMap?.defaultZoom !== 'undefined') { //Map default zoom viewTarget.zoom = store.state.currentMap?.defaultZoom; - }else if(typeof newValue.defaultZoom !== 'undefined') { //World default zoom - viewTarget.zoom = newValue.defaultZoom; } else { //Global default zoom viewTarget.zoom = store.state.configuration.defaultZoom; } @@ -220,8 +218,6 @@ export default defineComponent({ if(viewTarget.zoom == null) { if(typeof store.state.currentMap?.defaultZoom !== 'undefined') { //Map default zoom viewTarget.zoom = store.state.currentMap?.defaultZoom; - } else if(typeof newValue.defaultZoom !== 'undefined') { //World default zoom - viewTarget.zoom = newValue.defaultZoom; } else { //Global default zoom viewTarget.zoom = store.state.configuration.defaultZoom; } diff --git a/src/index.d.ts b/src/index.d.ts index 0427d30..f391255 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -152,12 +152,10 @@ interface LiveAtlasSortedPlayers extends Array { } interface LiveAtlasWorldDefinition { - seaLevel: number; name: string; displayName: string; dimension: LiveAtlasDimension; - center: Coordinate; - defaultZoom?: number; + seaLevel: number; maps: Set; } diff --git a/src/providers/OverviewerMapProvider.ts b/src/providers/OverviewerMapProvider.ts index 19c4ac2..4cb1d24 100644 --- a/src/providers/OverviewerMapProvider.ts +++ b/src/providers/OverviewerMapProvider.ts @@ -103,7 +103,6 @@ export default class OverviewerMapProvider extends MapProvider { displayName: world, dimension: guessWorldDimension(world), seaLevel: 64, - center: {x: 0, y: 64, z: 0}, maps: new Set(), }); }); diff --git a/src/providers/Pl3xmapMapProvider.ts b/src/providers/Pl3xmapMapProvider.ts index 4f5a43c..c9fd235 100644 --- a/src/providers/Pl3xmapMapProvider.ts +++ b/src/providers/Pl3xmapMapProvider.ts @@ -176,8 +176,6 @@ export default class Pl3xmapMapProvider extends MapProvider { displayName: world.display_name || world.name, dimension, seaLevel: 0, - center: {x: worldResponse.spawn.x, y: 0, z: worldResponse.spawn.z}, - defaultZoom: worldResponse.zoom.def || 1, maps, }; @@ -198,7 +196,10 @@ export default class Pl3xmapMapProvider extends MapProvider { nativeZoomLevels: worldResponse.zoom.max || 1, extraZoomLevels: worldResponse.zoom.extra, + defaultZoom: worldResponse.zoom.def || 1, tileUpdateInterval: worldResponse.tiles_update_interval ? worldResponse.tiles_update_interval * 1000 : undefined, + + center: {x: worldResponse.spawn.x, y: 0, z: worldResponse.spawn.z}, }))); worlds.push(w); diff --git a/src/util/dynmap.ts b/src/util/dynmap.ts index b2c4e28..37ce6c6 100644 --- a/src/util/dynmap.ts +++ b/src/util/dynmap.ts @@ -98,11 +98,6 @@ export function buildWorlds(response: Configuration, config: DynmapUrlConfig): A displayName: world.title || '', dimension: guessWorldDimension(world.name), seaLevel: world.sealevel || 64, - center: { - x: world.center.x || 0, - y: world.center.y || 0, - z: world.center.z || 0 - }, maps: new Set(), }); }); @@ -148,6 +143,12 @@ export function buildWorlds(response: Configuration, config: DynmapUrlConfig): A backgroundDay: map.backgroundday || '#000000', backgroundNight: map.backgroundnight || '#000000', + center: { + x: world.center.x || 0, + y: world.center.y || 0, + z: world.center.z || 0 + }, + nativeZoomLevels, extraZoomLevels: map.mapzoomin })) as LiveAtlasMapDefinition;