update changelog and build
This commit is contained in:
parent
3cc75db221
commit
e87e010e7d
@ -74,6 +74,7 @@ An in-progress version being developed on the master branch.
|
|||||||
* Fixed a bug where layers that belong to multiple feature groups didn't propagate events correctly (by [@danzel](https://github.com/danzel)). [#1359](https://github.com/Leaflet/Leaflet/pull/1359)
|
* Fixed a bug where layers that belong to multiple feature groups didn't propagate events correctly (by [@danzel](https://github.com/danzel)). [#1359](https://github.com/Leaflet/Leaflet/pull/1359)
|
||||||
* Fixed a bug where `Control.Attribution` `removeAttribution` of inexistant attribution corrupted the attribution text. [#1410](https://github.com/Leaflet/Leaflet/issues/1410)
|
* Fixed a bug where `Control.Attribution` `removeAttribution` of inexistant attribution corrupted the attribution text. [#1410](https://github.com/Leaflet/Leaflet/issues/1410)
|
||||||
* Fixed a bug where `TileLayer.WMS` `tileSize` option was ignored (by [@brianhatchl](https://github.com/brianhatchl)). [#1080](https://github.com/brianhatchl)
|
* Fixed a bug where `TileLayer.WMS` `tileSize` option was ignored (by [@brianhatchl](https://github.com/brianhatchl)). [#1080](https://github.com/brianhatchl)
|
||||||
|
* Fixed a bug where `Polyline` constructor could overwrite the source array (by [@snkashis](https://github.com/snkashis) and [@danzel](https://github.com/danzel)). [#1439](https://github.com/Leaflet/Leaflet/pull/1439) [#1092](https://github.com/Leaflet/Leaflet/issues/1092) [#1246](https://github.com/Leaflet/Leaflet/issues/1246) [#1426](https://github.com/Leaflet/Leaflet/issues/1426)
|
||||||
|
|
||||||
## 0.5.1 (February 6, 2013)
|
## 0.5.1 (February 6, 2013)
|
||||||
|
|
||||||
|
58
dist/leaflet-src.js
vendored
58
dist/leaflet-src.js
vendored
@ -1657,6 +1657,11 @@ L.Map = L.Class.extend({
|
|||||||
// public methods for getting map state
|
// public methods for getting map state
|
||||||
|
|
||||||
getCenter: function () { // (Boolean) -> LatLng
|
getCenter: function () { // (Boolean) -> LatLng
|
||||||
|
this._checkIfLoaded();
|
||||||
|
|
||||||
|
if (!this._moved()) {
|
||||||
|
return this._initialCenter;
|
||||||
|
}
|
||||||
return this.layerPointToLatLng(this._getCenterLayerPoint());
|
return this.layerPointToLatLng(this._getCenterLayerPoint());
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1744,9 +1749,7 @@ L.Map = L.Class.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
getPixelOrigin: function () {
|
getPixelOrigin: function () {
|
||||||
if (!this._loaded) {
|
this._checkIfLoaded();
|
||||||
throw new Error('Set map center and zoom first.');
|
|
||||||
}
|
|
||||||
return this._initialTopLeftPoint;
|
return this._initialTopLeftPoint;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1916,6 +1919,7 @@ L.Map = L.Class.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._zoom = zoom;
|
this._zoom = zoom;
|
||||||
|
this._initialCenter = center;
|
||||||
|
|
||||||
this._initialTopLeftPoint = this._getNewTopLeftPoint(center);
|
this._initialTopLeftPoint = this._getNewTopLeftPoint(center);
|
||||||
|
|
||||||
@ -1983,6 +1987,12 @@ L.Map = L.Class.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_checkIfLoaded: function () {
|
||||||
|
if (!this._loaded) {
|
||||||
|
throw new Error('Set map center and zoom first.');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// map events
|
// map events
|
||||||
|
|
||||||
_initEvents: function (onOff) {
|
_initEvents: function (onOff) {
|
||||||
@ -2066,6 +2076,11 @@ L.Map = L.Class.extend({
|
|||||||
return L.DomUtil.getPosition(this._mapPane);
|
return L.DomUtil.getPosition(this._mapPane);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_moved: function () {
|
||||||
|
var pos = this._getMapPanePos();
|
||||||
|
return pos && !pos.equals(new L.Point(0, 0));
|
||||||
|
},
|
||||||
|
|
||||||
_getTopLeftPoint: function () {
|
_getTopLeftPoint: function () {
|
||||||
return this.getPixelOrigin().subtract(this._getMapPanePos());
|
return this.getPixelOrigin().subtract(this._getMapPanePos());
|
||||||
},
|
},
|
||||||
@ -2702,9 +2717,11 @@ L.TileLayer = L.Class.extend({
|
|||||||
if (!this._tilesToLoad) {
|
if (!this._tilesToLoad) {
|
||||||
this.fire('load');
|
this.fire('load');
|
||||||
|
|
||||||
// clear scaled tiles after all new tiles are loaded (for performance)
|
if (this._animated) {
|
||||||
clearTimeout(this._clearBgBufferTimer);
|
// clear scaled tiles after all new tiles are loaded (for performance)
|
||||||
this._clearBgBufferTimer = setTimeout(L.bind(this._clearBgBuffer, this), 500);
|
clearTimeout(this._clearBgBufferTimer);
|
||||||
|
this._clearBgBufferTimer = setTimeout(L.bind(this._clearBgBuffer, this), 500);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -5032,7 +5049,7 @@ L.Polyline = L.Path.extend({
|
|||||||
|
|
||||||
spliceLatLngs: function () { // (Number index, Number howMany)
|
spliceLatLngs: function () { // (Number index, Number howMany)
|
||||||
var removed = [].splice.apply(this._latlngs, arguments);
|
var removed = [].splice.apply(this._latlngs, arguments);
|
||||||
this._convertLatLngs(this._latlngs);
|
this._convertLatLngs(this._latlngs, true);
|
||||||
this.redraw();
|
this.redraw();
|
||||||
return removed;
|
return removed;
|
||||||
},
|
},
|
||||||
@ -5070,15 +5087,16 @@ L.Polyline = L.Path.extend({
|
|||||||
return bounds;
|
return bounds;
|
||||||
},
|
},
|
||||||
|
|
||||||
_convertLatLngs: function (latlngs) {
|
_convertLatLngs: function (latlngs, overwrite) {
|
||||||
var i, len;
|
var i, len, target = overwrite ? latlngs : [];
|
||||||
|
|
||||||
for (i = 0, len = latlngs.length; i < len; i++) {
|
for (i = 0, len = latlngs.length; i < len; i++) {
|
||||||
if (L.Util.isArray(latlngs[i]) && typeof latlngs[i][0] !== 'number') {
|
if (L.Util.isArray(latlngs[i]) && typeof latlngs[i][0] !== 'number') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
latlngs[i] = L.latLng(latlngs[i]);
|
target[i] = L.latLng(latlngs[i]);
|
||||||
}
|
}
|
||||||
return latlngs;
|
return target;
|
||||||
},
|
},
|
||||||
|
|
||||||
_initEvents: function () {
|
_initEvents: function () {
|
||||||
@ -6836,6 +6854,7 @@ L.Map.BoxZoom = L.Handler.extend({
|
|||||||
L.DomEvent
|
L.DomEvent
|
||||||
.on(document, 'mousemove', this._onMouseMove, this)
|
.on(document, 'mousemove', this._onMouseMove, this)
|
||||||
.on(document, 'mouseup', this._onMouseUp, this)
|
.on(document, 'mouseup', this._onMouseUp, this)
|
||||||
|
.on(document, 'keydown', this._onKeyDown, this)
|
||||||
.preventDefault(e);
|
.preventDefault(e);
|
||||||
|
|
||||||
this._map.fire("boxzoomstart");
|
this._map.fire("boxzoomstart");
|
||||||
@ -6859,7 +6878,7 @@ L.Map.BoxZoom = L.Handler.extend({
|
|||||||
box.style.height = (Math.max(0, Math.abs(offset.y) - 4)) + 'px';
|
box.style.height = (Math.max(0, Math.abs(offset.y) - 4)) + 'px';
|
||||||
},
|
},
|
||||||
|
|
||||||
_onMouseUp: function (e) {
|
_finish: function () {
|
||||||
this._pane.removeChild(this._box);
|
this._pane.removeChild(this._box);
|
||||||
this._container.style.cursor = '';
|
this._container.style.cursor = '';
|
||||||
|
|
||||||
@ -6867,7 +6886,13 @@ L.Map.BoxZoom = L.Handler.extend({
|
|||||||
|
|
||||||
L.DomEvent
|
L.DomEvent
|
||||||
.off(document, 'mousemove', this._onMouseMove)
|
.off(document, 'mousemove', this._onMouseMove)
|
||||||
.off(document, 'mouseup', this._onMouseUp);
|
.off(document, 'mouseup', this._onMouseUp)
|
||||||
|
.off(document, 'keydown', this._onKeyDown);
|
||||||
|
},
|
||||||
|
|
||||||
|
_onMouseUp: function (e) {
|
||||||
|
|
||||||
|
this._finish();
|
||||||
|
|
||||||
var map = this._map,
|
var map = this._map,
|
||||||
layerPoint = map.mouseEventToLayerPoint(e);
|
layerPoint = map.mouseEventToLayerPoint(e);
|
||||||
@ -6883,6 +6908,12 @@ L.Map.BoxZoom = L.Handler.extend({
|
|||||||
map.fire("boxzoomend", {
|
map.fire("boxzoomend", {
|
||||||
boxZoomBounds: bounds
|
boxZoomBounds: bounds
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
_onKeyDown: function (e) {
|
||||||
|
if (e.keyCode === 27) {
|
||||||
|
this._finish();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -7857,6 +7888,7 @@ L.Map.include({
|
|||||||
|
|
||||||
setView: function (center, zoom, forceReset) {
|
setView: function (center, zoom, forceReset) {
|
||||||
zoom = this._limitZoom(zoom);
|
zoom = this._limitZoom(zoom);
|
||||||
|
center = L.latLng(center);
|
||||||
|
|
||||||
var zoomChanged = (this._zoom !== zoom);
|
var zoomChanged = (this._zoom !== zoom);
|
||||||
|
|
||||||
|
8
dist/leaflet.js
vendored
8
dist/leaflet.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user