Only check for moving draggable in canvas renderer when map is draggable#3942
Only check for moving draggable in canvas renderer when map is draggable#3942yohanboniface merged 3 commits intoLeaflet:masterfrom
Conversation
src/layer/vector/Canvas.js
Outdated
There was a problem hiding this comment.
This becomes a bit hard to follow, I wonder if we should not have a method on the L.Draggable object to make this more readable.
Something like this._map.dragging.moving() that would do both checks.
There was a problem hiding this comment.
Also, this._map._dragging, inheriting from L.Handler has a enabled() method that should be used here instead of private property.
There was a problem hiding this comment.
I agree. Should be a simple change, but let's look if we can update similar places to use the new method.
There was a problem hiding this comment.
Yep. I'm happy to update the pull request later.
|
Good catch! See code comments :) |
|
Ok, I just added a moving() method to the MapDrag handler, just like the moved() method there. |
Only check for moving draggable in canvas renderer when map is draggable
This is a fix for #3941