Merge pull request #554 from zedd45/boxzoom
add start & end events for Map.BoxZoom
This commit is contained in:
commit
b5d7d4c155
@ -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
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user