Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #554 from zedd45/boxzoom

add start & end events for Map.BoxZoom
  • Loading branch information...
commit b5d7d4c15574a1eabfc84144d1b605ccf6cd843c 2 parents 20c0bad + a4197a8
@mourner mourner authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/map/handler/Map.BoxZoom.js
View
6 src/map/handler/Map.BoxZoom.js
@@ -34,6 +34,8 @@ L.Map.BoxZoom = L.Handler.extend({
.addListener(document, 'mousemove', this._onMouseMove, this)
.addListener(document, 'mouseup', this._onMouseUp, this)
.preventDefault(e);
+
+ this._map.fire("boxzoomstart");
},
_onMouseMove: function (e) {
@@ -72,5 +74,9 @@ L.Map.BoxZoom = L.Handler.extend({
map.layerPointToLatLng(layerPoint));
map.fitBounds(bounds);
+
+ map.fire("boxzoomend", {
+ boxZoomBounds: bounds
+ });
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.