Skip to content

Commit

Permalink
Merge pull request #3942 from klaftertief/fix-canvas-move
Browse files Browse the repository at this point in the history
Only check for moving draggable in canvas renderer when map is draggable
  • Loading branch information
yohanboniface committed Oct 15, 2015
2 parents 55fe462 + 0df4d57 commit c2a3dc9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/layer/vector/Canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ L.Canvas = L.Renderer.extend({
},

_onMouseMove: function (e) {
if (!this._map || this._map.dragging._draggable._moving || this._map._animatingZoom) { return; }
if (!this._map || this._map.dragging.moving() || this._map._animatingZoom) { return; }

var point = this._map.mouseEventToLayerPoint(e);
this._handleMouseOut(e, point);
Expand Down
4 changes: 4 additions & 0 deletions src/map/handler/Map.Drag.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ L.Map.Drag = L.Handler.extend({
return this._draggable && this._draggable._moved;
},

moving: function () {
return this._draggable && this._draggable._moving;
},

_onDown: function () {
this._map.stop();
},
Expand Down

0 comments on commit c2a3dc9

Please sign in to comment.