update build and changelog

This commit is contained in:
Vladimir Agafonkin 2012-07-03 11:12:22 +03:00
parent 142bca022e
commit df6ea68438
3 changed files with 24 additions and 8 deletions

View File

@ -14,6 +14,7 @@ An in-progress version being developed on the master branch.
* Added an unobtrusive **scale control**.
* Added `DivIcon` class that easily allows you to create lightweight div-based markers.
* Added `Rectangle` vector layer (by [@JasonSanford](https://github.com/JasonSanford)). [#504](https://github.com/CloudMade/Leaflet/pull/504)
* Added *Android 4+ pinch-zoom* support (by [@danzel](https://github.com/danzel)). [#774](https://github.com/CloudMade/Leaflet/pull/774)
### Improvements
@ -95,6 +96,7 @@ An in-progress version being developed on the master branch.
* Fixed a bug with `Util.bind` sometimes losing arguments (by [@johtso](https://github.com/johtso)). [#588](https://github.com/CloudMade/Leaflet/pull/588)
* Fixed a bug where `drag` event was sometimes fired after `dragend`. [#555](https://github.com/CloudMade/Leaflet/issues/555)
* Fixed a bug where `TileLayer` `load` event was firing only once (by [@lapinos03](https://github.com/lapinos03) and [shintonik](https://github.com/shintonik)). [#742](https://github.com/CloudMade/Leaflet/pull/742) [#177](https://github.com/CloudMade/Leaflet/issues/177)
* Fixed a bug where `FeatureGroup` popup events where not cleaned up after removing a layer from it (by [@danzel](https://github.com/danzel)). [#775](https://github.com/CloudMade/Leaflet/pull/775)
#### Browser bugfixes

28
dist/leaflet-src.js vendored
View File

@ -277,7 +277,7 @@ L.Mixin.Events = {
if (typeof types === 'object') {
for (type in types) {
if (types.hasOwnProperty(type)) {
this.removeEventListener(type, types[type], context);
this.removeEventListener(type, types[type], fn);
}
}
@ -338,6 +338,7 @@ L.Mixin.Events.fire = L.Mixin.Events.fireEvent;
gecko = ua.indexOf("gecko") !== -1,
opera = window.opera,
android = ua.indexOf("android") !== -1,
android23 = ua.search("android [23]") !== -1,
mobile = typeof orientation !== undefined + '' ? true : false,
doc = document.documentElement,
ie3d = ie && ('transition' in doc.style),
@ -379,6 +380,7 @@ L.Mixin.Events.fire = L.Mixin.Events.fireEvent;
gecko: gecko,
opera: opera,
android: android,
android23: android23,
ie3d: ie3d,
webkit3d: webkit3d,
@ -1032,7 +1034,7 @@ L.Map = L.Class.extend({
layers: Array,
*/
fadeAnimation: L.DomUtil.TRANSITION && !L.Browser.android,
fadeAnimation: L.DomUtil.TRANSITION && !L.Browser.android23,
trackResize: true,
markerZoomAnimation: true
},
@ -3110,6 +3112,14 @@ L.FeatureGroup = L.LayerGroup.extend({
}
},
removeLayer: function (layer) {
this._deinitEvents(layer);
L.LayerGroup.prototype.removeLayer.call(this, layer);
this.invoke('unbindPopup');
},
bindPopup: function (content) {
this._popupContent = content;
return this.invoke('bindPopup', content);
@ -3131,6 +3141,10 @@ L.FeatureGroup = L.LayerGroup.extend({
layer.on('click dblclick mouseover mouseout', this._propagateEvent, this);
},
_deinitEvents: function (layer) {
layer.off('click dblclick mouseover mouseout', this._propagateEvent, this);
},
_propagateEvent: function (e) {
e.layer = e.target;
e.target = this;
@ -4977,7 +4991,7 @@ L.Handler = L.Class.extend({
L.Map.mergeOptions({
dragging: true,
inertia: !L.Browser.android,
inertia: !L.Browser.android23,
inertiaDeceleration: L.Browser.touch ? 3000 : 2000, // px/s^2
inertiaMaxSpeed: L.Browser.touch ? 1500 : 1000, // px/s
inertiaThreshold: L.Browser.touch ? 32 : 16, // ms
@ -5259,7 +5273,7 @@ L.Util.extend(L.DomEvent, {
*/
L.Map.mergeOptions({
touchZoom: L.Browser.touch && !L.Browser.android
touchZoom: L.Browser.touch && !L.Browser.android23
});
L.Map.TouchZoom = L.Handler.extend({
@ -6589,7 +6603,7 @@ L.Map.include(!(L.Transition && L.Transition.implemented()) ? {} : {
L.Map.mergeOptions({
zoomAnimation: L.DomUtil.TRANSITION && !L.Browser.android && !L.Browser.mobileOpera
zoomAnimation: L.DomUtil.TRANSITION && !L.Browser.android23 && !L.Browser.mobileOpera
});
L.Map.include(!L.DomUtil.TRANSITION ? {} : {
@ -6648,7 +6662,7 @@ L.Map.include(!L.DomUtil.TRANSITION ? {} : {
// it breaks touch zoom which Anroid doesn't support anyway, so that's a really ugly hack
// TODO work around this prettier
if (L.Browser.android) {
if (L.Browser.android23) {
tileBg.style[transform + 'Origin'] = origin.x + 'px ' + origin.y + 'px';
scaleStr = 'scale(' + scale + ')';
} else {
@ -6673,7 +6687,7 @@ L.Map.include(!L.DomUtil.TRANSITION ? {} : {
// If foreground layer doesn't have many tiles but bg layer does, keep the existing bg layer and just zoom it some more
// (disable this for Android due to it not supporting double translate)
if (!L.Browser.android && tileBg &&
if (!L.Browser.android23 && tileBg &&
this._getLoadedTilesPercentage(tileBg) > 0.5 &&
this._getLoadedTilesPercentage(tilePane) < 0.5) {

2
dist/leaflet.js vendored

File diff suppressed because one or more lines are too long