update build

This commit is contained in:
mourner 2012-07-30 01:39:13 +03:00
parent 3b2250cd32
commit e55e948986
3 changed files with 18 additions and 10 deletions

21
dist/leaflet-src.js vendored
View File

@ -6687,12 +6687,7 @@ L.Control.Scale = L.Control.extend({
container = L.DomUtil.create('div', className),
options = this.options;
if (options.metric) {
this._mScale = L.DomUtil.create('div', className + '-line', container);
}
if (options.imperial) {
this._iScale = L.DomUtil.create('div', className + '-line', container);
}
this._addScales(options, className, container);
map.on(options.updateWhenIdle ? 'moveend' : 'move', this._update, this);
this._update();
@ -6704,6 +6699,15 @@ L.Control.Scale = L.Control.extend({
map.off(this.options.updateWhenIdle ? 'moveend' : 'move', this._update, this);
},
_addScales: function (options, className, container) {
if (options.metric) {
this._mScale = L.DomUtil.create('div', className + '-line', container);
}
if (options.imperial) {
this._iScale = L.DomUtil.create('div', className + '-line', container);
}
},
_update: function () {
var bounds = this._map.getBounds(),
centerLat = bounds.getCenter().lat,
@ -6718,6 +6722,10 @@ L.Control.Scale = L.Control.extend({
maxMeters = dist * (options.maxWidth / size.x);
}
this._updateScales(options, maxMeters);
},
_updateScales: function (options, maxMeters) {
if (options.metric && maxMeters) {
this._updateMetric(maxMeters);
}
@ -6773,6 +6781,7 @@ L.control.scale = function (options) {
};
L.Control.Layers = L.Control.extend({
options: {
collapsed: true,

2
dist/leaflet.js vendored

File diff suppressed because one or more lines are too long

View File

@ -26,11 +26,10 @@ L.Control.Scale = L.Control.extend({
map.off(this.options.updateWhenIdle ? 'moveend' : 'move', this._update, this);
},
_addScales: function(options, className, container) {
_addScales: function (options, className, container) {
if (options.metric) {
this._mScale = L.DomUtil.create('div', className + '-line', container);
}
if (options.imperial) {
this._iScale = L.DomUtil.create('div', className + '-line', container);
}