Merge pull request #3233 from juliensoret/grabbingCursor

Fix cursor when dragging is set to false.
This commit is contained in:
Iván Sánchez Ortega 2015-05-08 16:32:24 +02:00
commit b849568ca0
2 changed files with 6 additions and 3 deletions

7
dist/leaflet.css vendored
View File

@ -180,7 +180,7 @@
.leaflet-interactive {
cursor: pointer;
}
.leaflet-container {
.leaflet-grab {
cursor: -webkit-grab;
cursor: -moz-grab;
}
@ -192,8 +192,9 @@
.leaflet-control {
cursor: auto;
}
.leaflet-dragging .leaflet-container,
.leaflet-dragging .leaflet-interactive {
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive,
.leaflet-dragging .leaflet-marker-draggable {
cursor: move;
cursor: -webkit-grabbing;
cursor: -moz-grabbing;

View File

@ -35,10 +35,12 @@ L.Map.Drag = L.Handler.extend({
map.whenReady(this._onViewReset, this);
}
}
L.DomUtil.addClass(this._map._container, 'leaflet-grab');
this._draggable.enable();
},
removeHooks: function () {
L.DomUtil.removeClass(this._map._container, 'leaflet-grab');
this._draggable.disable();
},