From 947ce6b18330fbfbf281275df26c4d52e2c5c0bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Wed, 10 Jun 2020 23:15:02 +0200 Subject: [PATCH] MAPG-119 view and JS adaptations for new map creation --- public/static/js/map_editor.js | 7 ++++++- views/admin/map_editor.php | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/public/static/js/map_editor.js b/public/static/js/map_editor.js index 494ee00..ef1108c 100644 --- a/public/static/js/map_editor.js +++ b/public/static/js/map_editor.js @@ -291,6 +291,11 @@ MapEditor.replacePlaceIdsToReal(this.response.added); + if (mapId === 0) { + mapId = this.response.mapId; + window.history.replaceState(null, '', '/admin/mapEditor/' + mapId); + } + MapEditor.added = {}; MapEditor.edited = {}; MapEditor.deleted = {}; @@ -370,7 +375,7 @@ ppi: highResData.ppi, tileSize: highResData.tileSize, zoomOffset: highResData.zoomOffset, - minZoom: 0, + minZoom: 2, maxZoom: 20 }).addTo(MapEditor.map); diff --git a/views/admin/map_editor.php b/views/admin/map_editor.php index cb776df..7f65a5f 100644 --- a/views/admin/map_editor.php +++ b/views/admin/map_editor.php @@ -62,9 +62,9 @@