Skip to content

Commit

Permalink
draw-tools: fix mobile-related bugs; add Circle again
Browse files Browse the repository at this point in the history
  • Loading branch information
johndoe committed Apr 25, 2019
1 parent 7151b4f commit ae6de54
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 0 additions & 5 deletions mobile/smartphone.css
Expand Up @@ -225,8 +225,3 @@ body {
border: 1px outset #20A8B1;
margin-top: 2px;
}

/* Hide drawtools circle on mobile */
.leaflet-draw-draw-circle {
display: none !important;
}
6 changes: 5 additions & 1 deletion plugins/draw-tools.user.js
Expand Up @@ -100,7 +100,6 @@ window.plugin.drawTools.addDrawControl = function() {
},

circle: {
circlemarker: false,
shapeOptions: window.plugin.drawTools.polygonOptions,
snapPoint: window.plugin.drawTools.getSnapLatLng,
},
Expand Down Expand Up @@ -584,6 +583,11 @@ window.plugin.drawTools.snapToPortals = function() {
}

window.plugin.drawTools.boot = function() {

// https://github.com/Leaflet/Leaflet.draw/issues/923
map.options.touchExtend = true;
map.addHandler('touchExtend', L.Map.TouchExtend);

// add a custom hook for draw tools to share it's activity with other plugins
pluginCreateHook('pluginDrawTools');

Expand Down

0 comments on commit ae6de54

Please sign in to comment.