Fix cursor when dragging is set to false.

This commit is contained in:
Julien SORET 2015-02-15 21:18:44 +01:00
parent a998f9b6c8
commit 03fb73ed22
2 changed files with 5 additions and 3 deletions

6
dist/leaflet.css vendored
View File

@ -179,7 +179,7 @@
.leaflet-interactive {
cursor: pointer;
}
.leaflet-container {
.leaflet-grab {
cursor: -webkit-grab;
cursor: -moz-grab;
}
@ -191,8 +191,8 @@
.leaflet-control {
cursor: auto;
}
.leaflet-dragging .leaflet-container,
.leaflet-dragging .leaflet-interactive {
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive {
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();
},