upgrade deps, fix indenting (#5743)

This commit is contained in:
Vladimir Agafonkin 2017-08-31 09:58:42 +03:00 committed by Per Liedman
parent 4e8b30a379
commit 88dd22cfe8
23 changed files with 80 additions and 78 deletions

View File

@ -28,7 +28,7 @@ const banner = `/* @preserve
export default { export default {
format: 'umd', format: 'umd',
moduleName: 'L', name: 'L',
banner: banner, banner: banner,
entry: 'src/Leaflet.js', entry: 'src/Leaflet.js',
dest: 'dist/leaflet-src.js', dest: 'dist/leaflet-src.js',

View File

@ -22,7 +22,7 @@ const banner = `
export default { export default {
format: 'umd', format: 'umd',
moduleName: 'L', name: 'L',
banner, banner,
entry: 'src/Leaflet.js', entry: 'src/Leaflet.js',
dest: 'dist/leaflet-src.js', dest: 'dist/leaflet-src.js',

View File

@ -3,7 +3,7 @@
"version": "1.2.0", "version": "1.2.0",
"description": "JavaScript library for mobile-friendly interactive maps", "description": "JavaScript library for mobile-friendly interactive maps",
"devDependencies": { "devDependencies": {
"eslint": "^3.5.0 <3.6.0", "eslint": "^4.5.0",
"eslint-config-mourner": "^2.0.1", "eslint-config-mourner": "^2.0.1",
"git-rev-sync": "^1.8.0", "git-rev-sync": "^1.8.0",
"happen": "~0.3.1", "happen": "~0.3.1",
@ -14,13 +14,13 @@
"karma-firefox-launcher": "~1.0.0", "karma-firefox-launcher": "~1.0.0",
"karma-mocha": "^1.2.0", "karma-mocha": "^1.2.0",
"karma-phantomjs-launcher": "^1.0.2", "karma-phantomjs-launcher": "^1.0.2",
"karma-rollup-preprocessor": "^4.0.1", "karma-rollup-preprocessor": "^5.0.1",
"karma-safari-launcher": "~1.0.0", "karma-safari-launcher": "~1.0.0",
"leafdoc": "^1.4.1", "leafdoc": "^1.4.1",
"mocha": "^3.1.0", "mocha": "^3.1.0",
"phantomjs-prebuilt": "^2.1.12", "phantomjs-prebuilt": "^2.1.12",
"prosthetic-hand": "^1.3.1", "prosthetic-hand": "^1.3.1",
"rollup": "^0.45.2", "rollup": "^0.49.2",
"rollup-plugin-git-version": "0.2.1", "rollup-plugin-git-version": "0.2.1",
"rollup-plugin-json": "^2.1.0", "rollup-plugin-json": "^2.1.0",
"rollup-watch": "^4.3.1", "rollup-watch": "^4.3.1",
@ -76,7 +76,8 @@
2, 2,
"tab", "tab",
{ {
"VariableDeclarator": 0 "VariableDeclarator": 0,
"flatTernaryExpressions": true
} }
], ],
"curly": 2, "curly": 2,

View File

@ -52,7 +52,7 @@ module.exports = function (config) {
json() json()
], ],
format: 'umd', format: 'umd',
moduleName: 'L' name: 'L'
}, },
// test results reporter to use // test results reporter to use

View File

@ -787,7 +787,7 @@ describe("Map", function () {
}); });
it.skipInNonPhantom('zoomIn ignores the zoomDelta option on non-any3d browsers', function (done) { 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.zoomSnap = 0.25;
map.options.zoomDelta = 0.25; map.options.zoomDelta = 0.25;
map.once('zoomend', function () { map.once('zoomend', function () {
@ -799,7 +799,7 @@ describe("Map", function () {
}); });
it.skipInPhantom('zoomIn respects the zoomDelta option on any3d browsers', function (done) { 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.zoomSnap = 0.25;
map.options.zoomDelta = 0.25; map.options.zoomDelta = 0.25;
map.setView(center, 10); map.setView(center, 10);
@ -812,7 +812,7 @@ describe("Map", function () {
}); });
it.skipInPhantom('zoomOut respects the zoomDelta option on any3d browsers', function (done) { 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.zoomSnap = 0.25;
map.options.zoomDelta = 0.25; map.options.zoomDelta = 0.25;
map.setView(center, 10); map.setView(center, 10);
@ -832,7 +832,7 @@ describe("Map", function () {
expect(map.getCenter()).to.eql(center); expect(map.getCenter()).to.eql(center);
done(); done();
}); });
// L.Browser.any3d = true; // L.Browser is frozen since ES6ication L.Browser.any3d = true;
map.zoomIn(0.22, {animate: false}); map.zoomIn(0.22, {animate: false});
}); });
@ -844,7 +844,7 @@ describe("Map", function () {
expect(map.getCenter()).to.eql(center); expect(map.getCenter()).to.eql(center);
done(); done();
}); });
// L.Browser.any3d = true; // L.Browser is frozen since ES6ication L.Browser.any3d = true;
map.zoomOut(0.22, {animate: false}); map.zoomOut(0.22, {animate: false});
}); });
}); });
@ -888,7 +888,7 @@ describe("Map", function () {
it.skipInPhantom('Snaps zoom to zoomSnap on any3d browsers', function (done) { it.skipInPhantom('Snaps zoom to zoomSnap on any3d browsers', function (done) {
map.options.zoomSnap = 0.25; map.options.zoomSnap = 0.25;
// L.Browser.any3d = true; // L.Browser is frozen since ES6ication L.Browser.any3d = true;
map.once('zoomend', function () { map.once('zoomend', function () {
expect(map.getZoom()).to.eql(2.75); expect(map.getZoom()).to.eql(2.75);
expect(map.getCenter().equals(boundsCenter, 0.05)).to.eql(true); 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) { it.skipInNonPhantom('Ignores zoomSnap on non-any3d browsers', function (done) {
map.options.zoomSnap = 0.25; map.options.zoomSnap = 0.25;
// L.Browser.any3d = false; // L.Browser is frozen since ES6ication L.Browser.any3d = false;
map.once('zoomend', function () { map.once('zoomend', function () {
expect(map.getZoom()).to.eql(2); expect(map.getZoom()).to.eql(2);
expect(map.getCenter().equals(boundsCenter, 0.05)).to.eql(true); expect(map.getCenter().equals(boundsCenter, 0.05)).to.eql(true);

View File

@ -155,7 +155,7 @@ export function getParamString(obj, existingUrl, uppercase) {
return ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&'); return ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&');
} }
var templateRe = /\{ *([\w_\-]+) *\}/g; var templateRe = /\{ *([\w_-]+) *\}/g;
// @function template(str: String, data: Object): String // @function template(str: String, data: Object): String
// Simple templating facility, accepts a template string of the form `'Hello {a}, {b}'` // Simple templating facility, accepts a template string of the form `'Hello {a}, {b}'`

View File

@ -5,9 +5,9 @@ import {_pointersCount} from './DomEvent.Pointer';
* Extends the event handling code with double tap support for mobile browsers. * Extends the event handling code with double tap support for mobile browsers.
*/ */
var _touchstart = Browser.msPointer ? 'MSPointerDown' : Browser.pointer ? 'pointerdown' : 'touchstart', var _touchstart = Browser.msPointer ? 'MSPointerDown' : Browser.pointer ? 'pointerdown' : 'touchstart';
_touchend = Browser.msPointer ? 'MSPointerUp' : Browser.pointer ? 'pointerup' : 'touchend', var _touchend = Browser.msPointer ? 'MSPointerUp' : Browser.pointer ? 'pointerup' : 'touchend';
_pre = '_leaflet_'; var _pre = '_leaflet_';
// inspired by Zepto touch code by Thomas Fuchs // inspired by Zepto touch code by Thomas Fuchs
export function addDoubleTapListener(obj, handler, id) { export function addDoubleTapListener(obj, handler, id) {

View File

@ -7,14 +7,14 @@ import * as Browser from '../core/Browser';
*/ */
var POINTER_DOWN = Browser.msPointer ? 'MSPointerDown' : 'pointerdown', var POINTER_DOWN = Browser.msPointer ? 'MSPointerDown' : 'pointerdown';
POINTER_MOVE = Browser.msPointer ? 'MSPointerMove' : 'pointermove', var POINTER_MOVE = Browser.msPointer ? 'MSPointerMove' : 'pointermove';
POINTER_UP = Browser.msPointer ? 'MSPointerUp' : 'pointerup', var POINTER_UP = Browser.msPointer ? 'MSPointerUp' : 'pointerup';
POINTER_CANCEL = Browser.msPointer ? 'MSPointerCancel' : 'pointercancel', var POINTER_CANCEL = Browser.msPointer ? 'MSPointerCancel' : 'pointercancel';
TAG_WHITE_LIST = ['INPUT', 'SELECT', 'OPTION'], var TAG_WHITE_LIST = ['INPUT', 'SELECT', 'OPTION'];
_pointers = {}, var _pointers = {};
_pointerDocListener = false; var _pointerDocListener = false;
// DomEvent.DoubleTap needs to know about this // DomEvent.DoubleTap needs to know about this
export var _pointersCount = 0; export var _pointersCount = 0;

View File

@ -52,7 +52,7 @@ export var IconDefault = Icon.extend({
if (path === null || path.indexOf('url') !== 0) { if (path === null || path.indexOf('url') !== 0) {
path = ''; path = '';
} else { } else {
path = path.replace(/^url\([\"\']?/, '').replace(/marker-icon\.png[\"\']?\)$/, ''); path = path.replace(/^url\(["']?/, '').replace(/marker-icon\.png["']?\)$/, '');
} }
return path; return path;

View File

@ -69,8 +69,9 @@ export var MarkerDrag = Handler.extend({
padding = this._marker.options.autoPanPadding, padding = this._marker.options.autoPanPadding,
iconPos = L.DomUtil.getPosition(marker._icon), iconPos = L.DomUtil.getPosition(marker._icon),
bounds = map.getPixelBounds(), bounds = map.getPixelBounds(),
origin = map.getPixelOrigin(), origin = map.getPixelOrigin();
panBounds = toBounds(
var panBounds = toBounds(
bounds.min._subtract(origin).add(padding), bounds.min._subtract(origin).add(padding),
bounds.max._subtract(origin).subtract(padding) bounds.max._subtract(origin).subtract(padding)
); );