[Pkg-javascript-commits] [leaflet] 22/301: Provide css classes for draggable markers, and in-progress drags.
Jonas Smedegaard
js at moszumanska.debian.org
Mon Jan 27 22:22:39 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository leaflet.
commit 1d3980b563817ce3d24a02b54eb5e142059cb236
Author: Steve Kashishian <steve at snkashis.com>
Date: Mon Jul 29 11:39:54 2013 -0400
Provide css classes for draggable markers, and in-progress drags.
---
src/layer/marker/Marker.Drag.js | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/layer/marker/Marker.Drag.js b/src/layer/marker/Marker.Drag.js
index d1ecd9f..b8ca80f 100644
--- a/src/layer/marker/Marker.Drag.js
+++ b/src/layer/marker/Marker.Drag.js
@@ -18,6 +18,7 @@ L.Handler.MarkerDrag = L.Handler.extend({
.on('drag', this._onDrag, this)
.on('dragend', this._onDragEnd, this);
this._draggable.enable();
+ L.DomUtil.addClass(this._marker._icon, 'leaflet-marker-draggable');
},
removeHooks: function () {
@@ -27,6 +28,7 @@ L.Handler.MarkerDrag = L.Handler.extend({
.off('dragend', this._onDragEnd, this);
this._draggable.disable();
+ L.DomUtil.removeClass(this._marker._icon, 'leaflet-marker-draggable');
},
moved: function () {
@@ -38,6 +40,7 @@ L.Handler.MarkerDrag = L.Handler.extend({
.closePopup()
.fire('movestart')
.fire('dragstart');
+ L.DomUtil.addClass(this._marker._icon, 'leaflet-marker-dragging');
},
_onDrag: function () {
@@ -62,5 +65,6 @@ L.Handler.MarkerDrag = L.Handler.extend({
this._marker
.fire('moveend')
.fire('dragend');
+ L.DomUtil.removeClass(this._marker._icon, 'leaflet-marker-dragging');
}
});
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet.git
More information about the Pkg-javascript-commits
mailing list