Stop click reaching anything below the buttons
This commit is contained in:
parent
0f890d1593
commit
743b5c6e8d
@ -16,11 +16,18 @@ L.EditControl = L.Control.extend({
|
|||||||
link.href = '#';
|
link.href = '#';
|
||||||
link.title = this.options.tooltip;
|
link.title = this.options.tooltip;
|
||||||
link.innerHTML = this.options.html;
|
link.innerHTML = this.options.html;
|
||||||
L.DomEvent.on(link, 'click', L.DomEvent.stop)
|
link.callback = this.options.callback;
|
||||||
.on(link, 'click', function () {
|
link.addEventListener('mousedown',function (event) {
|
||||||
window.LAYER = this.options.callback.call(map.editTools);
|
event.stopPropagation();
|
||||||
}, this);
|
event.preventDefault();
|
||||||
|
event.stopImmediatePropagation();
|
||||||
|
window.LAYER = this.callback.call(map.editTools);
|
||||||
|
}, false);
|
||||||
|
link.addEventListener('mouseup',function (event) {
|
||||||
|
event.stopPropagation();
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopImmediatePropagation();
|
||||||
|
}, false);
|
||||||
return container;
|
return container;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user