update build
This commit is contained in:
parent
3b2250cd32
commit
e55e948986
21
dist/leaflet-src.js
vendored
21
dist/leaflet-src.js
vendored
@ -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
2
dist/leaflet.js
vendored
File diff suppressed because one or more lines are too long
@ -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);
|
||||
}
|
||||
@ -106,4 +105,4 @@ L.Control.Scale = L.Control.extend({
|
||||
|
||||
L.control.scale = function (options) {
|
||||
return new L.Control.Scale(options);
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user