Skip to content

Commit

Permalink
Fixed fence/route editor not being clickable anymore (#1123)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrJul authored Apr 8, 2021
1 parent 3d60666 commit 2ffcdb8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
13 changes: 13 additions & 0 deletions static/madmin/static/js/madmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -1774,11 +1774,24 @@ new Vue({
layer.setStyle({ opacity: 1.0 });
layer.pm.enable({ snappable: false, allowSelfIntersection: allowSelfIntersection });

let dragging = false

layer.on("pm:markerdragstart", function() {
if (dragging) {
// ignore multiple drag starts (left + right mouse buttons at the same time)
return;
}

dragging = true;
mouseEventsIgnore.enableIgnore();
});

layer.on("pm:markerdragend", function() {
if (!dragging) {
return;
}

dragging = false;
mouseEventsIgnore.disableIgnore();
});
}
Expand Down
6 changes: 3 additions & 3 deletions static/madmin/templates/map.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
<script src="static/js/leaflet-sidebar.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.EasyButton/2.4.0/easy-button.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script>
<script src="https://unpkg.com/@geoman-io/leaflet-geoman-free@2.7.0/dist/leaflet-geoman.min.js"></script>
<script src="static/js/leaflet-event-forwarder.js?1599172474"></script>
<script src="https://unpkg.com/@geoman-io/leaflet-geoman-free@2.9.0/dist/leaflet-geoman.min.js"></script>
<script src="static/js/leaflet-event-forwarder.js?1617020349"></script>
<script src="static/js/s2geometry.min.js"></script>
<script src="static/js/madmin.js?1598819723"></script>
<script src="static/js/madmin.js?1617020349"></script>
{% endblock %}

{% block content %}
Expand Down

0 comments on commit 2ffcdb8

Please sign in to comment.