nakarte

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

commit 0a95af7a82133a76af362bfbf82f107b3083230e
parent 45b6c590c00bda2b4ab1c37c695de14739c9da1f
Author: Sergej Orlov <wladimirych@gmail.com>
Date:   Sun,  5 Jan 2020 13:44:46 +0100

fix lint errors (curly)

Diffstat:
Msrc/lib/leaflet.control.coordinates/formats.js | 4+++-
Msrc/lib/leaflet.control.panoramas/lib/mapillary/mvt.js | 2+-
Rsrc/lib/leaflet.control.panoramas/lib/mapillary/vector_tile_proto.js -> src/lib/leaflet.control.panoramas/lib/mapillary/vector_tile_pb.js | 0
Msrc/lib/leaflet.hashState/hashState.js | 3++-
Msrc/lib/leaflet.layer.bing/index.js | 22++++++++++++++++------
5 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/src/lib/leaflet.control.coordinates/formats.js b/src/lib/leaflet.control.coordinates/formats.js @@ -3,7 +3,9 @@ function formatNumber(value, size, precision = 0) { return value.toFixed(precision); } - if (precision > 0) size++; + if (precision > 0) { + size++; + } return value.toFixed(precision).padStart(size + precision, '0'); } diff --git a/src/lib/leaflet.control.panoramas/lib/mapillary/mvt.js b/src/lib/leaflet.control.panoramas/lib/mapillary/mvt.js @@ -1,5 +1,5 @@ import Pbf from 'pbf'; -import {Tile as TileProto} from './vector_tile_proto'; +import {Tile as TileProto} from './vector_tile_pb'; function decodeCoordinate(x) { return ((x >> 1) ^ (-(x & 1))); diff --git a/src/lib/leaflet.control.panoramas/lib/mapillary/vector_tile_proto.js b/src/lib/leaflet.control.panoramas/lib/mapillary/vector_tile_pb.js diff --git a/src/lib/leaflet.hashState/hashState.js b/src/lib/leaflet.hashState/hashState.js @@ -1,6 +1,7 @@ function arrayItemsEqual(l1, l2) { - if (l1.length !== l2.length) + if (l1.length !== l2.length) { return false; + } for (var i = 0; i < l1.length; i++) { if (l1[i] !== l2[i]) { return false; diff --git a/src/lib/leaflet.layer.bing/index.js b/src/lib/leaflet.layer.bing/index.js @@ -6,8 +6,12 @@ function tile2quad(x, y, z) { for (var i = z; i > 0; i--) { var digit = 0; var mask = 1 << (i - 1); - if ((x & mask) !== 0) digit += 1; - if ((y & mask) !== 0) digit += 2; + if ((x & mask) !== 0) { + digit += 1; + } + if ((y & mask) !== 0) { + digit += 2; + } quad += digit; } return quad; @@ -41,7 +45,9 @@ const BingLayer = L.TileLayer.extend({ }, loadMetadata: function () { - if (this.metaRequested) return; + if (this.metaRequested) { + return; + } this.metaRequested = true; var _this = this; var cbid = '_bing_metadata_' + L.Util.stamp(this); @@ -89,7 +95,9 @@ const BingLayer = L.TileLayer.extend({ }, _update: function () { - if (this._url === null || !this._map) return; + if (this._url === null || !this._map) { + return; + } this._update_attribution(); L.TileLayer.prototype._update.apply(this, []); }, @@ -101,12 +109,14 @@ const BingLayer = L.TileLayer.extend({ var p = this._providers[i]; if ((zoom <= p.zoomMax && zoom >= p.zoomMin) && bounds.intersects(p.bounds)) { - if (!p.active && this._map.attributionControl) + if (!p.active && this._map.attributionControl) { this._map.attributionControl.addAttribution(p.attrib); + } p.active = true; } else { - if (p.active && this._map.attributionControl) + if (p.active && this._map.attributionControl) { this._map.attributionControl.removeAttribution(p.attrib); + } p.active = false; } }