diff options
author | Markus Koch <markus@notsyncing.net> | 2020-04-20 00:02:28 +0200 |
---|---|---|
committer | Markus Koch <markus@notsyncing.net> | 2020-04-20 00:02:28 +0200 |
commit | be16cf2f6e4548d3ba6f0554202c921b0c90b5a5 (patch) | |
tree | 1599a9c6552e43c049363840e8fdf7fba401b955 /htdocs | |
parent | b2958f15d7534e50c8ac457c2e67e29aba868264 (diff) | |
download | lifomapserver-master.tar.gz lifomapserver-master.tar.bz2 lifomapserver-master.zip |
Diffstat (limited to 'htdocs')
-rw-r--r-- | htdocs/mapscript.js | 8 | ||||
-rw-r--r-- | htdocs/streeteditor.js | 1 |
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); |