Skip to content
Snippets Groups Projects
Commit a94d7f55 authored by Griefed's avatar Griefed :joystick:
Browse files

fix: Correctly write view radius and center to map JSON. Fix typo in...

fix: Correctly write view radius and center to map JSON. Fix typo in initialViewCenterX in JSON. Fixes issue #32
parent 914872cb
No related branches found
No related tags found
1 merge request!33fix: Correctly write view radius and center to map JSON. Fix typo in initialViewCenterX in JSON. Fixes issue #32
......@@ -295,13 +295,16 @@ export default defineComponent({
return (mapSize/2)+2
}
},
newMap(){
this.confirmMapNew = false;
this.store.methods.reset();
},
generateMap() {
this.downloadMap(this.store.methods.getMapId() + ".json", JSON.stringify(this.store.methods.exportMap(), null, 2));
},
downloadMap(mapName, map) {
var element = document.createElement('a');
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(map));
......
......@@ -77,10 +77,10 @@ const methods = {
return{
mapID: state.mapID,
mapName: state.mapName,
initialViewRadiusX: state.centerX,
initialViewRadiusY: state.centerY,
initialVieCenterX: state.radiusX,
initialViewCenterY: state.radiusY,
initialViewRadiusX: state.radiusX,
initialViewRadiusY: state.radiusY,
initialViewCenterX: state.centerX,
initialViewCenterY: state.centerY,
tileSet: state.lttMap.flat()}
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment