update build
This commit is contained in:
parent
859e6da53f
commit
756e828c17
90
dist/leaflet-src.js
vendored
90
dist/leaflet-src.js
vendored
@ -346,35 +346,40 @@ L.Mixin.Events.fire = L.Mixin.Events.fireEvent;
|
||||
|
||||
|
||||
(function () {
|
||||
var ua = navigator.userAgent.toLowerCase(),
|
||||
ie = !!window.ActiveXObject,
|
||||
|
||||
var ie = !!window.ActiveXObject,
|
||||
// http://tanalin.com/en/articles/ie-version-js/
|
||||
ie6 = ie && !window.XMLHttpRequest,
|
||||
ie7 = ie && !document.querySelector,
|
||||
|
||||
// terrible browser detection to work around Safari / iOS / Android browser bugs
|
||||
// see TileLayer._addTile and debug/hacks/jitter.html
|
||||
|
||||
ua = navigator.userAgent.toLowerCase(),
|
||||
webkit = ua.indexOf("webkit") !== -1,
|
||||
gecko = ua.indexOf("gecko") !== -1,
|
||||
//Terrible browser detection to work around a safari / iOS / android browser bug. See TileLayer._addTile and debug/hacks/jitter.html
|
||||
chrome = ua.indexOf("chrome") !== -1,
|
||||
opera = window.opera,
|
||||
android = ua.indexOf("android") !== -1,
|
||||
android23 = ua.search("android [23]") !== -1,
|
||||
mobile = typeof orientation !== undefined + '' ? true : false,
|
||||
|
||||
mobile = typeof orientation !== undefined + '',
|
||||
msTouch = (window.navigator && window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints),
|
||||
retina = (('devicePixelRatio' in window && window.devicePixelRatio > 1) ||
|
||||
('matchMedia' in window && window.matchMedia("(min-resolution:144dpi)").matches)),
|
||||
|
||||
doc = document.documentElement,
|
||||
ie3d = ie && ('transition' in doc.style),
|
||||
webkit3d = webkit && ('WebKitCSSMatrix' in window) && ('m11' in new window.WebKitCSSMatrix()),
|
||||
gecko3d = gecko && ('MozPerspective' in doc.style),
|
||||
opera3d = opera && ('OTransition' in doc.style),
|
||||
webkit3d = ('WebKitCSSMatrix' in window) && ('m11' in new window.WebKitCSSMatrix()),
|
||||
gecko3d = 'MozPerspective' in doc.style,
|
||||
opera3d = 'OTransition' in doc.style,
|
||||
any3d = !window.L_DISABLE_3D && (ie3d || webkit3d || gecko3d || opera3d);
|
||||
|
||||
msTouch = (window.navigator && window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints);
|
||||
|
||||
var touch = !window.L_NO_TOUCH && (function () {
|
||||
|
||||
var startName = 'ontouchstart';
|
||||
|
||||
// IE10+ (We simulate these into touch* events in L.DomEvent and L.DomEvent.MsTouch)
|
||||
if (msTouch) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// WebKit, etc
|
||||
if (startName in doc) {
|
||||
// IE10+ (We simulate these into touch* events in L.DomEvent and L.DomEvent.MsTouch) or WebKit, etc.
|
||||
if (msTouch || (startName in doc)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -397,15 +402,12 @@ L.Mixin.Events.fire = L.Mixin.Events.fireEvent;
|
||||
return supported;
|
||||
}());
|
||||
|
||||
var retina = (('devicePixelRatio' in window && window.devicePixelRatio > 1) || ('matchMedia' in window && window.matchMedia("(min-resolution:144dpi)").matches));
|
||||
|
||||
L.Browser = {
|
||||
ua: ua,
|
||||
ie: ie,
|
||||
ie6: ie6,
|
||||
ie7: ie7,
|
||||
webkit: webkit,
|
||||
gecko: gecko,
|
||||
opera: opera,
|
||||
|
||||
android: android,
|
||||
android23: android23,
|
||||
|
||||
@ -415,18 +417,19 @@ L.Mixin.Events.fire = L.Mixin.Events.fireEvent;
|
||||
webkit3d: webkit3d,
|
||||
gecko3d: gecko3d,
|
||||
opera3d: opera3d,
|
||||
any3d: !window.L_DISABLE_3D && (ie3d || webkit3d || gecko3d || opera3d),
|
||||
any3d: any3d,
|
||||
|
||||
mobile: mobile,
|
||||
mobileWebkit: mobile && webkit,
|
||||
mobileWebkit3d: mobile && webkit3d,
|
||||
mobileOpera: mobile && opera,
|
||||
mobileOpera: mobile && window.opera,
|
||||
|
||||
touch: touch,
|
||||
msTouch: msTouch,
|
||||
|
||||
retina: retina
|
||||
};
|
||||
|
||||
}());
|
||||
|
||||
|
||||
@ -682,7 +685,7 @@ L.DomUtil = {
|
||||
value = el.currentStyle[style];
|
||||
}
|
||||
|
||||
if (!value || value === 'auto') {
|
||||
if ((!value || value === 'auto') && document.defaultView) {
|
||||
var css = document.defaultView.getComputedStyle(el, null);
|
||||
value = css ? css[style] : null;
|
||||
}
|
||||
@ -696,10 +699,11 @@ L.DomUtil = {
|
||||
left = 0,
|
||||
el = element,
|
||||
docBody = document.body,
|
||||
pos;
|
||||
pos,
|
||||
ie7 = L.Browser.ie7;
|
||||
|
||||
do {
|
||||
top += el.offsetTop || 0;
|
||||
top += el.offsetTop || 0;
|
||||
left += el.offsetLeft || 0;
|
||||
pos = L.DomUtil.getStyle(el, 'position');
|
||||
|
||||
@ -722,12 +726,32 @@ L.DomUtil = {
|
||||
top -= el.scrollTop || 0;
|
||||
left -= el.scrollLeft || 0;
|
||||
|
||||
//Webkit (and ie <= 7) handles RTL scrollLeft different to everyone else
|
||||
// https://code.google.com/p/closure-library/source/browse/trunk/closure/goog/style/bidi.js
|
||||
if (!L.DomUtil.documentIsLtr() && (L.Browser.webkit || ie7)) {
|
||||
left += el.scrollWidth - el.clientWidth;
|
||||
|
||||
//ie7 shows the scrollbar by default and provides clientWidth counting it, so we need to add it back in if it is visible
|
||||
// Scrollbar is on the left as we are RTL
|
||||
if (ie7 && L.DomUtil.getStyle(el, 'overflow-y') !== 'hidden' && L.DomUtil.getStyle(el, 'overflow') !== 'hidden') {
|
||||
left += 17;
|
||||
}
|
||||
}
|
||||
|
||||
el = el.parentNode;
|
||||
} while (el);
|
||||
|
||||
return new L.Point(left, top);
|
||||
},
|
||||
|
||||
documentIsLtr: function () {
|
||||
if (!L.DomUtil._docIsLtrCached) {
|
||||
L.DomUtil._docIsLtrCached = true;
|
||||
L.DomUtil._docIsLtr = L.DomUtil.getStyle(document.body, 'direction') === "ltr";
|
||||
}
|
||||
return L.DomUtil._docIsLtr;
|
||||
},
|
||||
|
||||
create: function (tagName, className, container) {
|
||||
|
||||
var el = document.createElement(tagName);
|
||||
@ -785,7 +809,7 @@ L.DomUtil = {
|
||||
if ('opacity' in el.style) {
|
||||
el.style.opacity = value;
|
||||
|
||||
} else if (L.Browser.ie) {
|
||||
} else if ('filter' in el.style) {
|
||||
|
||||
var filter = false,
|
||||
filterName = 'DXImageTransform.Microsoft.Alpha';
|
||||
@ -3319,6 +3343,8 @@ L.Popup = L.Class.extend({
|
||||
},
|
||||
|
||||
_updatePosition: function () {
|
||||
if (!this._map) { return; }
|
||||
|
||||
var pos = this._map.latLngToLayerPoint(this._latlng),
|
||||
is3d = L.Browser.any3d,
|
||||
offset = this.options.offset;
|
||||
@ -3916,11 +3942,11 @@ L.Map.include({
|
||||
|
||||
_animatePathZoom: function (opt) {
|
||||
var scale = this.getZoomScale(opt.zoom),
|
||||
offset = this._getCenterOffset(opt.center).divideBy(1 - 1 / scale),
|
||||
viewportPos = this.containerPointToLayerPoint(this.getSize().multiplyBy(-L.Path.CLIP_PADDING)),
|
||||
origin = viewportPos.add(offset).round();
|
||||
offset = this._getCenterOffset(opt.center),
|
||||
translate = offset.multiplyBy(-scale)._add(this._pathViewport.min);
|
||||
|
||||
this._pathRoot.style[L.DomUtil.TRANSFORM] = L.DomUtil.getTranslateString((origin.multiplyBy(-1).add(L.DomUtil.getPosition(this._pathRoot)).multiplyBy(scale).add(origin))) + ' scale(' + scale + ') ';
|
||||
this._pathRoot.style[L.DomUtil.TRANSFORM] =
|
||||
L.DomUtil.getTranslateString(translate) + ' scale(' + scale + ') ';
|
||||
|
||||
this._pathZooming = true;
|
||||
},
|
||||
|
2
dist/leaflet.js
vendored
2
dist/leaflet.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user