diff --git a/src/store/getters.ts b/src/store/getters.ts index 7523e7b..7be4eba 100644 --- a/src/store/getters.ts +++ b/src/store/getters.ts @@ -68,16 +68,11 @@ export const getters: GetterTree & Getters = { }, url(state: State): string { - const x = state.currentLocation.x, - y = state.currentLocation.y, - z = state.currentLocation.z, - zoom = state.currentZoom; - if(!state.currentWorld || !state.currentMap) { return ''; } - return getUrlForLocation(state.currentMap, {x,y,z}, zoom); + return getUrlForLocation(state.currentMap, state.currentLocation, state.currentZoom); }, pageTitle(state: State): string { diff --git a/src/util.ts b/src/util.ts index 3638dc6..bc87a05 100644 --- a/src/util.ts +++ b/src/util.ts @@ -193,7 +193,7 @@ const validateParsedUrl = (parsed: any) => { export const getUrlForLocation = (map: LiveAtlasMapDefinition, location: Coordinate, zoom: number): string => { const x = Math.round(location.x), - y = Math.round(location.y || 0), + y = Math.round(location.y), z = Math.round(location.z), locationString = `${x},${y},${z}`;