upgrade deps, fix indenting (#5743)
This commit is contained in:
parent
4e8b30a379
commit
88dd22cfe8
@ -28,7 +28,7 @@ const banner = `/* @preserve
|
||||
|
||||
export default {
|
||||
format: 'umd',
|
||||
moduleName: 'L',
|
||||
name: 'L',
|
||||
banner: banner,
|
||||
entry: 'src/Leaflet.js',
|
||||
dest: 'dist/leaflet-src.js',
|
||||
|
@ -22,7 +22,7 @@ const banner = `
|
||||
|
||||
export default {
|
||||
format: 'umd',
|
||||
moduleName: 'L',
|
||||
name: 'L',
|
||||
banner,
|
||||
entry: 'src/Leaflet.js',
|
||||
dest: 'dist/leaflet-src.js',
|
||||
|
@ -3,7 +3,7 @@
|
||||
"version": "1.2.0",
|
||||
"description": "JavaScript library for mobile-friendly interactive maps",
|
||||
"devDependencies": {
|
||||
"eslint": "^3.5.0 <3.6.0",
|
||||
"eslint": "^4.5.0",
|
||||
"eslint-config-mourner": "^2.0.1",
|
||||
"git-rev-sync": "^1.8.0",
|
||||
"happen": "~0.3.1",
|
||||
@ -14,13 +14,13 @@
|
||||
"karma-firefox-launcher": "~1.0.0",
|
||||
"karma-mocha": "^1.2.0",
|
||||
"karma-phantomjs-launcher": "^1.0.2",
|
||||
"karma-rollup-preprocessor": "^4.0.1",
|
||||
"karma-rollup-preprocessor": "^5.0.1",
|
||||
"karma-safari-launcher": "~1.0.0",
|
||||
"leafdoc": "^1.4.1",
|
||||
"mocha": "^3.1.0",
|
||||
"phantomjs-prebuilt": "^2.1.12",
|
||||
"prosthetic-hand": "^1.3.1",
|
||||
"rollup": "^0.45.2",
|
||||
"rollup": "^0.49.2",
|
||||
"rollup-plugin-git-version": "0.2.1",
|
||||
"rollup-plugin-json": "^2.1.0",
|
||||
"rollup-watch": "^4.3.1",
|
||||
@ -76,7 +76,8 @@
|
||||
2,
|
||||
"tab",
|
||||
{
|
||||
"VariableDeclarator": 0
|
||||
"VariableDeclarator": 0,
|
||||
"flatTernaryExpressions": true
|
||||
}
|
||||
],
|
||||
"curly": 2,
|
||||
|
@ -52,7 +52,7 @@ module.exports = function (config) {
|
||||
json()
|
||||
],
|
||||
format: 'umd',
|
||||
moduleName: 'L'
|
||||
name: 'L'
|
||||
},
|
||||
|
||||
// test results reporter to use
|
||||
|
@ -341,12 +341,12 @@ describe('GridLayer', function () {
|
||||
};
|
||||
|
||||
grid.on('tileload tileunload tileerror tileloadstart', function (ev) {
|
||||
// console.log(ev.type);
|
||||
// console.log(ev.type);
|
||||
counts[ev.type]++;
|
||||
});
|
||||
// grid.on('tileunload', function (ev) {
|
||||
// console.log(ev.type, ev.coords, counts);
|
||||
// });
|
||||
// grid.on('tileunload', function (ev) {
|
||||
// console.log(ev.type, ev.coords, counts);
|
||||
// });
|
||||
|
||||
map.options.fadeAnimation = false;
|
||||
map.options.zoomAnimation = false;
|
||||
@ -545,7 +545,7 @@ describe('GridLayer', function () {
|
||||
// browsers due to CSS animations!
|
||||
it.skipInPhantom("Loads 32, unloads 16 tiles zooming in 10-11", function (done) {
|
||||
|
||||
// grid.on('tileload tileunload tileloadstart load', logTiles);
|
||||
// grid.on('tileload tileunload tileloadstart load', logTiles);
|
||||
|
||||
grid.on('load', function () {
|
||||
expect(counts.tileloadstart).to.be(16);
|
||||
@ -553,7 +553,7 @@ describe('GridLayer', function () {
|
||||
expect(counts.tileunload).to.be(0);
|
||||
grid.off('load');
|
||||
|
||||
// grid.on('load', logTiles);
|
||||
// grid.on('load', logTiles);
|
||||
grid.on('load', function () {
|
||||
|
||||
// We're one frame into the zoom animation, there are
|
||||
@ -618,7 +618,7 @@ describe('GridLayer', function () {
|
||||
// browsers due to CSS animations!
|
||||
it.skipInPhantom("Loads 32, unloads 16 tiles zooming out 11-10", function (done) {
|
||||
|
||||
// grid.on('tileload tileunload load', logTiles);
|
||||
// grid.on('tileload tileunload load', logTiles);
|
||||
|
||||
grid.on('load', function () {
|
||||
expect(counts.tileloadstart).to.be(16);
|
||||
@ -626,11 +626,11 @@ describe('GridLayer', function () {
|
||||
expect(counts.tileunload).to.be(0);
|
||||
grid.off('load');
|
||||
|
||||
// grid.on('load', logTiles);
|
||||
// grid.on('load', logTiles);
|
||||
grid.on('load', function () {
|
||||
|
||||
grid.off('load');
|
||||
// grid.on('load', logTiles);
|
||||
// grid.on('load', logTiles);
|
||||
|
||||
// We're one frame into the zoom animation, there are
|
||||
// 16 tiles for z11 plus 4 tiles for z10 covering the
|
||||
@ -717,9 +717,9 @@ describe('GridLayer', function () {
|
||||
|
||||
map.flyTo(trd, 12, {animate: true});
|
||||
|
||||
// map.on('_frame', function () {
|
||||
// console.log('frame', counts);
|
||||
// });
|
||||
// map.on('_frame', function () {
|
||||
// console.log('frame', counts);
|
||||
// });
|
||||
|
||||
runFrames(500);
|
||||
});
|
||||
@ -756,12 +756,12 @@ describe('GridLayer', function () {
|
||||
};
|
||||
|
||||
grid.on('tileload tileunload tileerror tileloadstart', function (ev) {
|
||||
// console.log(ev.type);
|
||||
// console.log(ev.type);
|
||||
counts[ev.type]++;
|
||||
});
|
||||
// grid.on('tileunload', function (ev) {
|
||||
// console.log(ev.type, ev.coords, counts);
|
||||
// });
|
||||
// grid.on('tileunload', function (ev) {
|
||||
// console.log(ev.type, ev.coords, counts);
|
||||
// });
|
||||
|
||||
map.options.fadeAnimation = false;
|
||||
map.options.zoomAnimation = false;
|
||||
|
@ -214,12 +214,12 @@ describe('TileLayer', function () {
|
||||
};
|
||||
|
||||
kittenLayer.on('tileload tileunload tileerror tileloadstart', function (ev) {
|
||||
// console.log(ev.type);
|
||||
// console.log(ev.type);
|
||||
counts[ev.type]++;
|
||||
});
|
||||
// grid.on('tileunload', function (ev) {
|
||||
// console.log(ev.type, ev.coords, counts);
|
||||
// });
|
||||
// grid.on('tileunload', function (ev) {
|
||||
// console.log(ev.type, ev.coords, counts);
|
||||
// });
|
||||
|
||||
map.options.fadeAnimation = false;
|
||||
map.options.zoomAnimation = false;
|
||||
|
@ -193,7 +193,7 @@ describe("Map", function () {
|
||||
var container = map.getContainer();
|
||||
container.style.height = height;
|
||||
document.body.appendChild(container);
|
||||
// L.Browser.any3d = true; // L.Browser is frozen since ES6ication
|
||||
// L.Browser.any3d = true; // L.Browser is frozen since ES6ication
|
||||
map.options.zoomSnap = 0.5;
|
||||
expect(map.getBoundsZoom(bounds, false, padding)).to.be.equal(19.5);
|
||||
map.options.zoomSnap = 0.2;
|
||||
@ -787,7 +787,7 @@ describe("Map", function () {
|
||||
});
|
||||
|
||||
it.skipInNonPhantom('zoomIn ignores the zoomDelta option on non-any3d browsers', function (done) {
|
||||
// L.Browser.any3d = false; // L.Browser is frozen since ES6ication
|
||||
L.Browser.any3d = false;
|
||||
map.options.zoomSnap = 0.25;
|
||||
map.options.zoomDelta = 0.25;
|
||||
map.once('zoomend', function () {
|
||||
@ -799,7 +799,7 @@ describe("Map", function () {
|
||||
});
|
||||
|
||||
it.skipInPhantom('zoomIn respects the zoomDelta option on any3d browsers', function (done) {
|
||||
// L.Browser.any3d = true; // L.Browser is frozen since ES6ication
|
||||
L.Browser.any3d = true;
|
||||
map.options.zoomSnap = 0.25;
|
||||
map.options.zoomDelta = 0.25;
|
||||
map.setView(center, 10);
|
||||
@ -812,7 +812,7 @@ describe("Map", function () {
|
||||
});
|
||||
|
||||
it.skipInPhantom('zoomOut respects the zoomDelta option on any3d browsers', function (done) {
|
||||
// L.Browser.any3d = true; // L.Browser is frozen since ES6ication
|
||||
L.Browser.any3d = true;
|
||||
map.options.zoomSnap = 0.25;
|
||||
map.options.zoomDelta = 0.25;
|
||||
map.setView(center, 10);
|
||||
@ -832,7 +832,7 @@ describe("Map", function () {
|
||||
expect(map.getCenter()).to.eql(center);
|
||||
done();
|
||||
});
|
||||
// L.Browser.any3d = true; // L.Browser is frozen since ES6ication
|
||||
L.Browser.any3d = true;
|
||||
map.zoomIn(0.22, {animate: false});
|
||||
});
|
||||
|
||||
@ -844,7 +844,7 @@ describe("Map", function () {
|
||||
expect(map.getCenter()).to.eql(center);
|
||||
done();
|
||||
});
|
||||
// L.Browser.any3d = true; // L.Browser is frozen since ES6ication
|
||||
L.Browser.any3d = true;
|
||||
map.zoomOut(0.22, {animate: false});
|
||||
});
|
||||
});
|
||||
@ -888,7 +888,7 @@ describe("Map", function () {
|
||||
|
||||
it.skipInPhantom('Snaps zoom to zoomSnap on any3d browsers', function (done) {
|
||||
map.options.zoomSnap = 0.25;
|
||||
// L.Browser.any3d = true; // L.Browser is frozen since ES6ication
|
||||
L.Browser.any3d = true;
|
||||
map.once('zoomend', function () {
|
||||
expect(map.getZoom()).to.eql(2.75);
|
||||
expect(map.getCenter().equals(boundsCenter, 0.05)).to.eql(true);
|
||||
@ -899,7 +899,7 @@ describe("Map", function () {
|
||||
|
||||
it.skipInNonPhantom('Ignores zoomSnap on non-any3d browsers', function (done) {
|
||||
map.options.zoomSnap = 0.25;
|
||||
// L.Browser.any3d = false; // L.Browser is frozen since ES6ication
|
||||
L.Browser.any3d = false;
|
||||
map.once('zoomend', function () {
|
||||
expect(map.getZoom()).to.eql(2);
|
||||
expect(map.getCenter().equals(boundsCenter, 0.05)).to.eql(true);
|
||||
|
@ -141,7 +141,7 @@ describe("Map.Keyboard", function () {
|
||||
expect(popup.isOpen()).to.be(true);
|
||||
|
||||
happen.keydown(document, {keyCode: 27}); // 27 = Esc
|
||||
// happen.keypress(document, {keyCode: 27});
|
||||
// happen.keypress(document, {keyCode: 27});
|
||||
happen.keyup(document, {keyCode: 27});
|
||||
|
||||
expect(popup.isOpen()).to.be(false);
|
||||
|
@ -155,7 +155,7 @@ export function getParamString(obj, existingUrl, uppercase) {
|
||||
return ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&');
|
||||
}
|
||||
|
||||
var templateRe = /\{ *([\w_\-]+) *\}/g;
|
||||
var templateRe = /\{ *([\w_-]+) *\}/g;
|
||||
|
||||
// @function template(str: String, data: Object): String
|
||||
// Simple templating facility, accepts a template string of the form `'Hello {a}, {b}'`
|
||||
|
@ -5,9 +5,9 @@ import {_pointersCount} from './DomEvent.Pointer';
|
||||
* Extends the event handling code with double tap support for mobile browsers.
|
||||
*/
|
||||
|
||||
var _touchstart = Browser.msPointer ? 'MSPointerDown' : Browser.pointer ? 'pointerdown' : 'touchstart',
|
||||
_touchend = Browser.msPointer ? 'MSPointerUp' : Browser.pointer ? 'pointerup' : 'touchend',
|
||||
_pre = '_leaflet_';
|
||||
var _touchstart = Browser.msPointer ? 'MSPointerDown' : Browser.pointer ? 'pointerdown' : 'touchstart';
|
||||
var _touchend = Browser.msPointer ? 'MSPointerUp' : Browser.pointer ? 'pointerup' : 'touchend';
|
||||
var _pre = '_leaflet_';
|
||||
|
||||
// inspired by Zepto touch code by Thomas Fuchs
|
||||
export function addDoubleTapListener(obj, handler, id) {
|
||||
|
@ -7,14 +7,14 @@ import * as Browser from '../core/Browser';
|
||||
*/
|
||||
|
||||
|
||||
var POINTER_DOWN = Browser.msPointer ? 'MSPointerDown' : 'pointerdown',
|
||||
POINTER_MOVE = Browser.msPointer ? 'MSPointerMove' : 'pointermove',
|
||||
POINTER_UP = Browser.msPointer ? 'MSPointerUp' : 'pointerup',
|
||||
POINTER_CANCEL = Browser.msPointer ? 'MSPointerCancel' : 'pointercancel',
|
||||
TAG_WHITE_LIST = ['INPUT', 'SELECT', 'OPTION'],
|
||||
var POINTER_DOWN = Browser.msPointer ? 'MSPointerDown' : 'pointerdown';
|
||||
var POINTER_MOVE = Browser.msPointer ? 'MSPointerMove' : 'pointermove';
|
||||
var POINTER_UP = Browser.msPointer ? 'MSPointerUp' : 'pointerup';
|
||||
var POINTER_CANCEL = Browser.msPointer ? 'MSPointerCancel' : 'pointercancel';
|
||||
var TAG_WHITE_LIST = ['INPUT', 'SELECT', 'OPTION'];
|
||||
|
||||
_pointers = {},
|
||||
_pointerDocListener = false;
|
||||
var _pointers = {};
|
||||
var _pointerDocListener = false;
|
||||
|
||||
// DomEvent.DoubleTap needs to know about this
|
||||
export var _pointersCount = 0;
|
||||
|
@ -52,7 +52,7 @@ export var IconDefault = Icon.extend({
|
||||
if (path === null || path.indexOf('url') !== 0) {
|
||||
path = '';
|
||||
} else {
|
||||
path = path.replace(/^url\([\"\']?/, '').replace(/marker-icon\.png[\"\']?\)$/, '');
|
||||
path = path.replace(/^url\(["']?/, '').replace(/marker-icon\.png["']?\)$/, '');
|
||||
}
|
||||
|
||||
return path;
|
||||
|
@ -69,8 +69,9 @@ export var MarkerDrag = Handler.extend({
|
||||
padding = this._marker.options.autoPanPadding,
|
||||
iconPos = L.DomUtil.getPosition(marker._icon),
|
||||
bounds = map.getPixelBounds(),
|
||||
origin = map.getPixelOrigin(),
|
||||
panBounds = toBounds(
|
||||
origin = map.getPixelOrigin();
|
||||
|
||||
var panBounds = toBounds(
|
||||
bounds.min._subtract(origin).add(padding),
|
||||
bounds.max._subtract(origin).subtract(padding)
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user