fix typos and regression in #1122

This commit is contained in:
Vladimir Agafonkin 2012-11-07 19:21:21 +02:00
parent ed0686996a
commit 7517cbcd53
7 changed files with 632 additions and 607 deletions

1216
dist/leaflet-src.js vendored

File diff suppressed because it is too large Load Diff

2
dist/leaflet.js vendored

File diff suppressed because one or more lines are too long

View File

@ -17,7 +17,7 @@
mobile = typeof orientation !== undefined + '',
msTouch = (window.navigator && window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints),
retina = (('devicePixelRatio' in window && window.devicePixelRatio > 1) ||
('matchMedia' in window && window.matchMedia("(min-resolution:144dpi)").matches)),
('matchMedia' in window && window.matchMedia("(min-resolution:144dpi)").matches)),
doc = document.documentElement,
ie3d = ie && ('transition' in doc.style),

View File

@ -87,7 +87,7 @@ L.Util.extend(L.DomEvent, {
e.changedTouches = [e];
handler(e);
};
}
obj[pre + 'touchmove' + id] = cb;
obj.addEventListener('MSPointerMove', cb, false);

View File

@ -22,7 +22,7 @@ L.FeatureGroup = L.LayerGroup.extend({
layer.bindPopup(this._popupContent);
}
return this;
return this.fire('layeradd', {layer: layer});
},
removeLayer: function (layer) {
@ -30,11 +30,12 @@ L.FeatureGroup = L.LayerGroup.extend({
L.LayerGroup.prototype.removeLayer.call(this, layer);
if (this._popupContent) {
return this.invoke('unbindPopup');
} else {
return this;
this.invoke('unbindPopup');
}
return this.fire('layerremove', {layer: layer});
},
bindPopup: function (content) {

View File

@ -24,8 +24,6 @@ L.LayerGroup = L.Class.extend({
this._map.addLayer(layer);
}
this.fire('layeradd', { layer: layer });
return this;
},
@ -38,8 +36,6 @@ L.LayerGroup = L.Class.extend({
this._map.removeLayer(layer);
}
this.fire('layerremove', { layer: layer });
return this;
},

View File

@ -25,9 +25,9 @@ L.Polygon = L.Polyline.extend({
if (!this._holes) { return; }
var i, j, len, len2;
var i, j, len, len2, hole;
for (i = 0, len = this._holes.length, hole; i < len; i++) {
for (i = 0, len = this._holes.length; i < len; i++) {
this._holePoints[i] = [];
for (j = 0, len2 = this._holes[i].length; j < len2; j++) {