From: Tom Hughes Date: Tue, 4 Dec 2012 14:31:08 +0000 (+0000) Subject: Don't try and add a note when the control is disabled X-Git-Tag: live~5068^2~52 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/ee530d8111c92999e1a495b5a23aea9319c1309c?ds=sidebyside Don't try and add a note when the control is disabled --- diff --git a/app/assets/javascripts/index/notes.js.erb b/app/assets/javascripts/index/notes.js.erb index eecf91ef0..c4f758482 100644 --- a/app/assets/javascripts/index/notes.js.erb +++ b/app/assets/javascripts/index/notes.js.erb @@ -174,6 +174,8 @@ $(document).ready(function () { $("#createnoteanchor").click(function (e) { e.preventDefault(); + if ($(e.target).hasClass("disabled")) return; + map.addLayer(noteLayer); var marker = L.marker(map.getCenter(), {