add autopanstart event to Map

This commit is contained in:
mourner 2012-06-23 02:20:32 +03:00
parent 76b0a1de5a
commit 0479e24034
3 changed files with 5 additions and 3 deletions

3
dist/leaflet-src.js vendored
View File

@ -2731,7 +2731,7 @@ L.Popup = L.Class.extend({
L.DomUtil.setPosition(this._container, pos);
},
_zoomAnimation: function (opt) {
var pos = this._map._latLngToNewLayerPoint(this._latlng, opt.zoom, opt.center)._round();
@ -2767,6 +2767,7 @@ L.Popup = L.Class.extend({
}
if (adjustOffset.x || adjustOffset.y) {
map.fire('autopanstart');
map.panBy(adjustOffset);
}
},

2
dist/leaflet.js vendored

File diff suppressed because one or more lines are too long

View File

@ -176,7 +176,7 @@ L.Popup = L.Class.extend({
L.DomUtil.setPosition(this._container, pos);
},
_zoomAnimation: function (opt) {
var pos = this._map._latLngToNewLayerPoint(this._latlng, opt.zoom, opt.center)._round();
@ -212,6 +212,7 @@ L.Popup = L.Class.extend({
}
if (adjustOffset.x || adjustOffset.y) {
map.fire('autopanstart');
map.panBy(adjustOffset);
}
},