summaryrefslogtreecommitdiff
path: root/htdocs
diff options
context:
space:
mode:
Diffstat (limited to 'htdocs')
-rw-r--r--htdocs/mapscript.js8
-rw-r--r--htdocs/streeteditor.js1
2 files changed, 8 insertions, 1 deletions
diff --git a/htdocs/mapscript.js b/htdocs/mapscript.js
index 1887c2a..365a41d 100644
--- a/htdocs/mapscript.js
+++ b/htdocs/mapscript.js
@@ -359,7 +359,15 @@ function dragstart(e) {
is_user_drag = 1;
}
+function update_aa_status() {
+ if (mymap.getZoom() > zoom_level_real)
+ document.getElementById('mapid').classList.add("no-aa");
+ else
+ document.getElementById('mapid').classList.remove("no-aa");
+}
+
mymap.on('zoomend', function () {is_user_drag = 1; update_hash_from_position();});
+mymap.on('zoomend', update_aa_status);
mymap.on('moveend', update_hash_from_position);
mymap.on('dragstart', function () { is_user_drag = 1;});
mymap.on('keydown', function (e) { if (e.originalEvent.code.match(/Arrow.*/)) is_user_drag = 1;});
diff --git a/htdocs/streeteditor.js b/htdocs/streeteditor.js
index 6cc8e18..2d9f074 100644
--- a/htdocs/streeteditor.js
+++ b/htdocs/streeteditor.js
@@ -94,7 +94,6 @@ if (editor_mode) {
window.addEventListener("mouseup", onDragEnd, false); // Workaround as polyline.on(dragend, ) doesn't seem to work
// Configure map for better editing
- document.getElementById('mapid').classList.add("no-aa");
mymap.setMaxZoom(14);
mymap.off('click', onMapClick);