update build

This commit is contained in:
Vladimir Agafonkin
2012-07-13 12:16:26 +03:00
parent 444e0dba7c
commit c28036f2c8
2 changed files with 8 additions and 7 deletions

13
dist/leaflet-src.js vendored
View File

@ -4335,6 +4335,8 @@ L.Polyline = L.Path.extend({
},
_updatePath: function () {
if (!this._map) { return; }
this._clipPoints();
this._simplifyPoints();
@ -6300,16 +6302,15 @@ L.Control.Scale = L.Control.extend({
_update: function () {
var bounds = this._map.getBounds(),
centerLat = bounds.getCenter().lat,
left = new L.LatLng(centerLat, bounds.getSouthWest().lng),
right = new L.LatLng(centerLat, bounds.getNorthEast().lng),
halfWorldMeters = new L.LatLng(centerLat, 0).distanceTo(new L.LatLng(centerLat, 180)),
dist = halfWorldMeters * (bounds.getNorthEast().lng - bounds.getSouthWest().lng) / 180,
size = this._map.getSize(),
options = this.options,
maxMeters = 0;
maxMeters = 0;
if (size.x > 0) {
maxMeters = left.distanceTo(right) * (options.maxWidth / size.x);
maxMeters = dist * (options.maxWidth / size.x);
}
if (options.metric && maxMeters) {
@ -6356,7 +6357,7 @@ L.Control.Scale = L.Control.extend({
var pow10 = Math.pow(10, (Math.floor(num) + '').length - 1),
d = num / pow10;
d = d >= 10 ? 10 : d >= 5 ? 5 : d >= 2 ? 2 : 1;
d = d >= 10 ? 10 : d >= 5 ? 5 : d >= 3 ? 3 : d >= 2 ? 2 : 1;
return pow10 * d;
}

2
dist/leaflet.js vendored

File diff suppressed because one or more lines are too long