Leaflet.draw prevent events <p>I have added the draw control to my Mapbox map and only have polygon enabled. I'm attempting to prevent the draw tool from going into draw mode if the user has not zoomed into a certain level. I have added a click event to the polygon button using it's class, but I cannot figure out what call I need to make to cancel the draw.</p> <pre><code>$('.leaflet-draw-draw-polygon').on('click', function (e) { if (map.getZoom() &lt; 13) //Cancel draw else drawingPolygon = true; }); </code></pre>