update build
This commit is contained in:
parent
c6e9702a08
commit
9660f75642
77
dist/leaflet-src.js
vendored
77
dist/leaflet-src.js
vendored
@ -2,29 +2,30 @@
|
|||||||
Leaflet, a JavaScript library for mobile-friendly interactive maps. http://leafletjs.com
|
Leaflet, a JavaScript library for mobile-friendly interactive maps. http://leafletjs.com
|
||||||
(c) 2010-2013, Vladimir Agafonkin, CloudMade
|
(c) 2010-2013, Vladimir Agafonkin, CloudMade
|
||||||
*/
|
*/
|
||||||
(function (window, document, undefined) {/*
|
(function (window, document, undefined) {
|
||||||
* The L namespace contains all Leaflet classes and functions.
|
var oldL = window.L,
|
||||||
* This code allows you to handle any possible namespace conflicts.
|
L = {};
|
||||||
*/
|
|
||||||
|
|
||||||
var L, originalL;
|
|
||||||
|
|
||||||
if (typeof exports !== undefined + '') {
|
|
||||||
L = exports;
|
|
||||||
} else {
|
|
||||||
originalL = window.L;
|
|
||||||
L = {};
|
|
||||||
|
|
||||||
L.noConflict = function () {
|
|
||||||
window.L = originalL;
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
window.L = L;
|
|
||||||
}
|
|
||||||
|
|
||||||
L.version = '0.6-dev';
|
L.version = '0.6-dev';
|
||||||
|
|
||||||
|
// define Leaflet for Node module pattern loaders, including Browserify
|
||||||
|
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||||
|
module.exports = L;
|
||||||
|
|
||||||
|
// define Leaflet as an AMD module
|
||||||
|
} else if (typeof define === 'function' && define.amd) {
|
||||||
|
define('leaflet', [], function () { return L; });
|
||||||
|
}
|
||||||
|
|
||||||
|
// define Leaflet as a global L variable, saving the original L to restore later if needed
|
||||||
|
|
||||||
|
L.noConflict = function () {
|
||||||
|
window.L = oldL;
|
||||||
|
return this;
|
||||||
|
};
|
||||||
|
|
||||||
|
window.L = L;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* L.Util contains various utility functions used throughout Leaflet code.
|
* L.Util contains various utility functions used throughout Leaflet code.
|
||||||
@ -1675,7 +1676,7 @@ L.Map = L.Class.extend({
|
|||||||
hasLayer: function (layer) {
|
hasLayer: function (layer) {
|
||||||
if (!layer) { return false; }
|
if (!layer) { return false; }
|
||||||
|
|
||||||
return (L.stamp(layer) in this);
|
return (L.stamp(layer) in this._layers);
|
||||||
},
|
},
|
||||||
|
|
||||||
eachLayer: function (method, context) {
|
eachLayer: function (method, context) {
|
||||||
@ -3855,7 +3856,7 @@ L.Popup = L.Class.extend({
|
|||||||
layerPos = new L.Point(this._containerLeft, -containerHeight - this._containerBottom);
|
layerPos = new L.Point(this._containerLeft, -containerHeight - this._containerBottom);
|
||||||
|
|
||||||
if (this._animated) {
|
if (this._animated) {
|
||||||
layerPos.add(L.DomUtil.getPosition(this._container));
|
layerPos._add(L.DomUtil.getPosition(this._container));
|
||||||
}
|
}
|
||||||
|
|
||||||
var containerPos = map.layerPointToContainerPoint(layerPos),
|
var containerPos = map.layerPointToContainerPoint(layerPos),
|
||||||
@ -7199,9 +7200,16 @@ L.Map.Keyboard = L.Handler.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onMouseDown: function () {
|
_onMouseDown: function () {
|
||||||
if (!this._focused) {
|
if (this._focused) { return; }
|
||||||
this._map._container.focus();
|
|
||||||
}
|
var body = document.body,
|
||||||
|
docEl = document.documentElement,
|
||||||
|
top = body.scrollTop || docEl.scrollTop,
|
||||||
|
left = body.scrollTop || docEl.scrollLeft;
|
||||||
|
|
||||||
|
this._map._container.focus();
|
||||||
|
|
||||||
|
window.scrollTo(left, top);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onFocus: function () {
|
_onFocus: function () {
|
||||||
@ -8045,7 +8053,7 @@ L.PosAnimation = L.Class.extend({
|
|||||||
L.Util.falseFn(el.offsetWidth);
|
L.Util.falseFn(el.offsetWidth);
|
||||||
|
|
||||||
// there's no native way to track value updates of transitioned properties, so we imitate this
|
// there's no native way to track value updates of transitioned properties, so we imitate this
|
||||||
this._stepTimer = setInterval(L.bind(this.fire, this, 'step'), 50);
|
this._stepTimer = setInterval(L.bind(this._onStep, this), 50);
|
||||||
},
|
},
|
||||||
|
|
||||||
stop: function () {
|
stop: function () {
|
||||||
@ -8059,6 +8067,14 @@ L.PosAnimation = L.Class.extend({
|
|||||||
L.Util.falseFn(this._el.offsetWidth); // force reflow in case we are about to start a new animation
|
L.Util.falseFn(this._el.offsetWidth); // force reflow in case we are about to start a new animation
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_onStep: function () {
|
||||||
|
// jshint camelcase: false
|
||||||
|
// make L.DomUtil.getPosition return intermediate position value during animation
|
||||||
|
this._el._leaflet_pos = this._getPos();
|
||||||
|
|
||||||
|
this.fire('step');
|
||||||
|
},
|
||||||
|
|
||||||
// you can't easily get intermediate values of properties animated with CSS3 Transitions,
|
// you can't easily get intermediate values of properties animated with CSS3 Transitions,
|
||||||
// we need to parse computed style (in case of transform it returns matrix string)
|
// we need to parse computed style (in case of transform it returns matrix string)
|
||||||
|
|
||||||
@ -8483,7 +8499,7 @@ L.Map.include({
|
|||||||
|
|
||||||
locate: function (/*Object*/ options) {
|
locate: function (/*Object*/ options) {
|
||||||
|
|
||||||
options = this._locationOptions = L.extend(this._defaultLocateOptions, options);
|
options = this._locateOptions = L.extend(this._defaultLocateOptions, options);
|
||||||
|
|
||||||
if (!navigator.geolocation) {
|
if (!navigator.geolocation) {
|
||||||
this._handleGeolocationError({
|
this._handleGeolocationError({
|
||||||
@ -8509,6 +8525,9 @@ L.Map.include({
|
|||||||
if (navigator.geolocation) {
|
if (navigator.geolocation) {
|
||||||
navigator.geolocation.clearWatch(this._locationWatchId);
|
navigator.geolocation.clearWatch(this._locationWatchId);
|
||||||
}
|
}
|
||||||
|
if (this._locateOptions) {
|
||||||
|
this._locateOptions.setView = false;
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -8518,7 +8537,7 @@ L.Map.include({
|
|||||||
(c === 1 ? 'permission denied' :
|
(c === 1 ? 'permission denied' :
|
||||||
(c === 2 ? 'position unavailable' : 'timeout'));
|
(c === 2 ? 'position unavailable' : 'timeout'));
|
||||||
|
|
||||||
if (this._locationOptions.setView && !this._loaded) {
|
if (this._locateOptions.setView && !this._loaded) {
|
||||||
this.fitWorld();
|
this.fitWorld();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8540,7 +8559,7 @@ L.Map.include({
|
|||||||
[lat - latAccuracy, lng - lngAccuracy],
|
[lat - latAccuracy, lng - lngAccuracy],
|
||||||
[lat + latAccuracy, lng + lngAccuracy]),
|
[lat + latAccuracy, lng + lngAccuracy]),
|
||||||
|
|
||||||
options = this._locationOptions;
|
options = this._locateOptions;
|
||||||
|
|
||||||
if (options.setView) {
|
if (options.setView) {
|
||||||
var zoom = Math.min(this.getBoundsZoom(bounds), options.maxZoom);
|
var zoom = Math.min(this.getBoundsZoom(bounds), options.maxZoom);
|
||||||
|
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