nakarte

Source code of https://map.sikmir.ru (fork)
git clone git://git.sikmir.ru/nakarte
Log | Files | Refs | LICENSE

commit 969f51e06b80ec56adf3b9e43d4e21e92ac937d4
parent a0526547befdff35c013c20ba2b25c2acb5deec0
Author: Sergej Orlov <wladimirych@gmail.com>
Date:   Sun, 26 Jan 2020 01:12:18 +0100

fix lint errors (space-infix-ops)

Diffstat:
Msrc/layers.js | 2+-
Msrc/lib/leaflet.control.elevation-profile/index.js | 4++--
Msrc/lib/leaflet.control.jnx/index.js | 2+-
Msrc/lib/leaflet.control.panoramas/index.js | 2+-
Msrc/lib/leaflet.control.panoramas/lib/mapillary/index.js | 2+-
Msrc/lib/leaflet.control.panoramas/lib/mapillary/mvt.js | 4++--
Msrc/lib/leaflet.control.panoramas/lib/wikimedia/index.js | 4++--
Msrc/lib/leaflet.control.track-list/lib/parsers/ozi.js | 2+-
Msrc/lib/leaflet.fixes/fixWorldCopyJump.js | 2+-
Msrc/lib/leaflet.fixes/index.js | 2+-
Msrc/lib/leaflet.layer.bing/index.js | 4++--
Msrc/lib/logging/index.js | 4++--
Msrc/lib/xhr-promise/index.js | 8++++----
13 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/src/layers.js b/src/layers.js @@ -1144,7 +1144,7 @@ function getLayers() { // assign order to layers const orderByTitle = {}; - for (let i=0; i < titlesByOrder.length; i++) { + for (let i = 0; i < titlesByOrder.length; i++) { let title = titlesByOrder[i]; orderByTitle[title] = i + 1; } diff --git a/src/lib/leaflet.control.elevation-profile/index.js b/src/lib/leaflet.control.elevation-profile/index.js @@ -553,7 +553,7 @@ const ElevationProfile = L.Class.extend({ tickSteps = [1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000], ticks = [], i, j, k, ticksN, tickStep, tick1, tick2, - matchFound=false; + matchFound = false; for (i = 0; i < tickSteps.length; i++) { tickStep = tickSteps[i]; @@ -650,7 +650,7 @@ const ElevationProfile = L.Class.extend({ const ascents = [], descents = []; let prevNotNullValue = values[firstNotNullIndex], - prevNotNullIndex=firstNotNullIndex; + prevNotNullIndex = firstNotNullIndex; for (let i = firstNotNullIndex + 1; i <= lastNotNullIndex; i++) { let value = values[i]; if (value === null) { diff --git a/src/lib/leaflet.control.jnx/index.js b/src/lib/leaflet.control.jnx/index.js @@ -38,7 +38,7 @@ L.Control.JNX = L.Control.extend({ estimateTilesCount: function(maxZoom) { let tilesCount = 0; const bounds = this._selector.getBounds(); - for (let zoom=minZoom(maxZoom); zoom <= maxZoom; zoom++) { + for (let zoom = minZoom(maxZoom); zoom <= maxZoom; zoom++) { const topLeftTile = this._map.project(bounds.getNorthWest(), zoom).divideBy(256).floor(); const bottomRightTile = this._map.project(bounds.getSouthEast(), zoom).divideBy(256).ceil(); tilesCount += Math.ceil((bottomRightTile.x - topLeftTile.x) * (bottomRightTile.y - topLeftTile.y)); diff --git a/src/lib/leaflet.control.panoramas/index.js b/src/lib/leaflet.control.panoramas/index.js @@ -327,7 +327,7 @@ L.Control.Panoramas.include({ let state = null; if (this.controlEnabled) { state = []; - let coverageCode='_'; + let coverageCode = '_'; for (let provider of this.providers) { if (provider.selected()) { coverageCode += provider.code; diff --git a/src/lib/leaflet.control.panoramas/lib/mapillary/index.js b/src/lib/leaflet.control.panoramas/lib/mapillary/index.js @@ -115,7 +115,7 @@ const Viewer = L.Evented.extend({ updateZoomAndCenter: function() { this.viewer.getZoom().then((zoom) => { - this._zoom=zoom; + this._zoom = zoom; }); this.viewer.getCenter().then((center) => { this._center = center; diff --git a/src/lib/leaflet.control.panoramas/lib/mapillary/mvt.js b/src/lib/leaflet.control.panoramas/lib/mapillary/mvt.js @@ -43,7 +43,7 @@ function parseGeometry(geometryType, ints, coordinatesScale) { // eslint-disable if (!line) { throw new Error('LineTo with empty linestring'); } - pos +=1; + pos += 1; for (let cmdN = 0; cmdN < cmdRepeat; cmdN++) { if (pos + 2 > len) { throw new Error('Not enough elements for LineTo arguments'); @@ -105,7 +105,7 @@ function parseFeatures(layer, coordinatesScale) { return features; } -function decodeMvt(ar, tileExtent=256) { +function decodeMvt(ar, tileExtent = 256) { const pbf = new Pbf(new Uint8Array(ar)), tileData = TileProto.read(pbf); diff --git a/src/lib/leaflet.control.panoramas/lib/wikimedia/index.js b/src/lib/leaflet.control.panoramas/lib/wikimedia/index.js @@ -198,7 +198,7 @@ const Viewer = L.Evented.extend({ } }, - switchPhoto: function(imageIdx, imagePos=null) { + switchPhoto: function(imageIdx, imagePos = null) { this._imageIdx = imageIdx; if (this.imageLayer) { this.map.removeLayer(this.imageLayer); @@ -270,7 +270,7 @@ const Viewer = L.Evented.extend({ } }, - _showPano: function(images, imageIdx=0, imagePos=null) { + _showPano: function(images, imageIdx = 0, imagePos = null) { this.images = images; this.setupPageButtons(images.length); this.switchPhoto(imageIdx, imagePos); diff --git a/src/lib/leaflet.control.track-list/lib/parsers/ozi.js b/src/lib/leaflet.control.track-list/lib/parsers/ozi.js @@ -10,7 +10,7 @@ function parseOziRte(txt, name) { return null; } let currentSegment = []; - for (let i=4; i < lines.length; i++) { + for (let i = 4; i < lines.length; i++) { let line = lines[i].trim(); if (!line) { continue; diff --git a/src/lib/leaflet.fixes/fixWorldCopyJump.js b/src/lib/leaflet.fixes/fixWorldCopyJump.js @@ -13,7 +13,7 @@ function shiftLongitudeToTarget(lng, targetLng) { if (Math.abs(lng + 360 - targetLng) < Math.abs(lng - targetLng)) { shift = 360; } else if (Math.abs(lng - 360 - targetLng) < Math.abs(lng - targetLng)) { - shift= - 360; + shift = - 360; } return shift; } diff --git a/src/lib/leaflet.fixes/index.js b/src/lib/leaflet.fixes/index.js @@ -19,7 +19,7 @@ function fixPanAnimationBug() { } function fixTouchDetection() { - L.Browser.touch &= ((navigator.pointerEnabled && !L.Browser.ie)|| navigator.maxTouchPoints); + L.Browser.touch &= ((navigator.pointerEnabled && !L.Browser.ie) || navigator.maxTouchPoints); } function fixMapKeypressEvent() { diff --git a/src/lib/leaflet.layer.bing/index.js b/src/lib/leaflet.layer.bing/index.js @@ -80,8 +80,8 @@ const BingLayer = L.TileLayer.extend({ var c = p.coverageAreas[j]; var coverage = {zoomMin: c.zoomMin, zoomMax: c.zoomMax, active: false}; var bounds = new L.LatLngBounds( - new L.LatLng(c.bbox[0]+0.01, c.bbox[1]+0.01), - new L.LatLng(c.bbox[2]-0.01, c.bbox[3]-0.01) + new L.LatLng(c.bbox[0] + 0.01, c.bbox[1] + 0.01), + new L.LatLng(c.bbox[2] - 0.01, c.bbox[3] - 0.01) ); coverage.bounds = bounds; coverage.attrib = p.attribution; diff --git a/src/lib/logging/index.js b/src/lib/logging/index.js @@ -6,7 +6,7 @@ function randId() { const sessionId = randId(); -function captureMessage(msg, extra={}) { +function captureMessage(msg, extra = {}) { extra.url = window.location.toString(); console.log('captureMessage', msg, extra); // eslint-disable-line no-console Sentry.withScope(function(scope) { @@ -25,7 +25,7 @@ function captureException(e, description) { Sentry.captureException(e); }); } -function captureBreadcrumb(message, data={}) { +function captureBreadcrumb(message, data = {}) { data.url = window.location.toString(); Sentry.addBreadcrumb({ message, data diff --git a/src/lib/xhr-promise/index.js b/src/lib/xhr-promise/index.js @@ -20,9 +20,9 @@ class XMLHttpRequestPromiseError extends Error { class XMLHttpRequestPromise { constructor( - url, {method='GET', data=null, responseType='', timeout=30000, maxTries=3, retryTimeWait=500, - isResponseSuccess=successIfStatus200, responseNeedsRetry=retryIfNetworkErrorOrServerError, - headers=null} = {}) { + url, {method = 'GET', data = null, responseType = '', timeout = 30000, maxTries = 3, retryTimeWait = 500, + isResponseSuccess = successIfStatus200, responseNeedsRetry = retryIfNetworkErrorOrServerError, + headers = null} = {}) { // console.log('promise constructor', url); const promise = new Promise((resolve, reject) => { this._resolve = resolve; @@ -111,7 +111,7 @@ class XMLHttpRequestPromise { } class XHRQueue { - constructor(maxSimultaneousRequests=6) { + constructor(maxSimultaneousRequests = 6) { this._maxConnections = maxSimultaneousRequests; this._queue = []; this._activeCount = 0;