Skip to content

Commit

Permalink
Merge pull request #245 from atombender/master
Browse files Browse the repository at this point in the history
Fire event 'editstart' on shape edit
  • Loading branch information
jacobtoye committed Dec 17, 2013
2 parents e2da4c2 + 043f2f9 commit 802540f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/edit/handler/Edit.Poly.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down
2 changes: 2 additions & 0 deletions src/edit/handler/Edit.SimpleShape.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down

0 comments on commit 802540f

Please sign in to comment.