Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fire event 'editstart' on shape edit #245

Merged
merged 1 commit into from

2 participants

@atombender

Fire event editstart (complementing the edit event) when user starts modifying the shape.

@jacobtoye jacobtoye merged commit 802540f into Leaflet:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 16, 2013
  1. @atombender

    Fire event 'editstart' on shape (complementing the 'edit' event) when…

    atombender authored
    … user starts modifying the shape.
This page is out of date. Refresh to see the latest.
View
2  src/edit/handler/Edit.Poly.js
@@ -199,6 +199,8 @@ L.Edit.Poly = L.Handler.extend({
marker2._index++;
this._updatePrevNext(marker1, marker);
this._updatePrevNext(marker, marker2);
+
+ this._poly.fire('editstart');
};
onDragEnd = function () {
View
2  src/edit/handler/Edit.SimpleShape.js
@@ -100,6 +100,8 @@ L.Edit.SimpleShape = L.Handler.extend({
_onMarkerDragStart: function (e) {
var marker = e.target;
marker.setOpacity(0);
+
+ this._shape.fire('editstart');
},
_fireEdit: function () {
Something went wrong with that request. Please try again.