prevent cursor marker from consuming mouse events

This commit is contained in:
Norbert Renner 2014-08-23 20:07:51 +02:00
parent 34e59e0734
commit 8344404483

View file

@ -15,7 +15,11 @@ BR.Routing = L.Routing.extend({
var container = L.Routing.prototype.onAdd.call(this, map);
this._draw.on('enabled', function() {
// crosshair cursor
L.DomUtil.addClass(map.getContainer(), 'routing-draw-enabled');
// prevent cursor marker from consuming mouse events (invisible with draw:false)
this._marker._icon.style.pointerEvents = 'none';
});
this._draw.on('disabled', function() {
L.DomUtil.removeClass(map.getContainer(), 'routing-draw-enabled');