commit f7c7d6d51549c835d27c1198e6200f1345e09806
parent fe87e895538bcb6fd3f04078f51da8f552bd8b7a
Author: Sergej Orlov <wladimirych@gmail.com>
Date: Sat, 25 Jan 2020 23:00:44 +0100
fix lint errors (object-property-newline)
Diffstat:
6 files changed, 49 insertions(+), 28 deletions(-)
diff --git a/src/lib/leaflet.control.elevation-profile/index.js b/src/lib/leaflet.control.elevation-profile/index.js
@@ -941,7 +941,8 @@ const ElevationProfile = L.Class.extend({
// sightline
if (this.options.sightLine) {
path = L.Util.template('M{x1} {y1} L{x2} {y2}', {
- x1: 0, x2: this.svgWidth * this.horizZoom,
+ x1: 0,
+ x2: this.svgWidth * this.horizZoom,
y1: valueToSvgCoord(this.values[0]),
y2: valueToSvgCoord(this.values[this.values.length - 1])
}
diff --git a/src/lib/leaflet.control.panoramas/index.js b/src/lib/leaflet.control.panoramas/index.js
@@ -57,20 +57,33 @@ L.Control.Panoramas = L.Control.extend({
getProviders: function() {
return [
- {name: 'google', title: 'Google street view', provider: googleProvider, layerOptions: {zIndex: 10},
- code: 'g',
- selected: ko.observable(true),
- mapMarkerType: 'normal'},
- {name: 'wikimedia', title: 'Wikimedia commons', provider: wikimediaProvider,
+ {
+ name: 'google',
+ title: 'Google street view',
+ provider: googleProvider,
+ layerOptions: {zIndex: 10},
+ code: 'g',
+ selected: ko.observable(true),
+ mapMarkerType: 'normal'
+ },
+ {
+ name: 'wikimedia',
+ title: 'Wikimedia commons',
+ provider: wikimediaProvider,
layerOptions: {opacity: 0.7, zIndex: 9},
code: 'w',
selected: ko.observable(false),
- mapMarkerType: 'slim'},
- {name: 'mapillary', title: 'Mapillary', provider: mapillaryProvider,
+ mapMarkerType: 'slim'
+ },
+ {
+ name: 'mapillary',
+ title: 'Mapillary',
+ provider: mapillaryProvider,
layerOptions: {opacity: 0.7, zIndex: 8},
code: 'm',
selected: ko.observable(false),
- mapMarkerType: 'normal'},
+ mapMarkerType: 'normal'
+ },
];
},
diff --git a/src/lib/leaflet.control.panoramas/lib/wikimedia/index.js b/src/lib/leaflet.control.panoramas/lib/wikimedia/index.js
@@ -8,10 +8,8 @@ import config from '~/config';
function getCoverageLayer(options) {
const url = config.wikimediaCommonsCoverageUrl;
return new MultiLayer([
- {layer: L.tileLayer(url, L.extend({}, options, {tms: true})),
- minZoom: 0, maxZoom: 10},
- {layer: new WikimediaVectorCoverage(url, options),
- minZoom: 11, maxZoom: 18}
+ {layer: L.tileLayer(url, L.extend({}, options, {tms: true})), minZoom: 0, maxZoom: 10},
+ {layer: new WikimediaVectorCoverage(url, options), minZoom: 11, maxZoom: 18}
]);
}
diff --git a/src/lib/leaflet.layer.canvasMarkers/index.js b/src/lib/leaflet.layer.canvasMarkers/index.js
@@ -273,10 +273,13 @@ L.Layer.CanvasMarkers = L.GridLayer.extend({
y = Math.round(y);
this._iconPositions[markerId] = [x, y];
this._regions.insert({
- minX: x, minY: y, maxX: x + imgW, maxY: y + imgH,
- marker: job.marker, isLabel: false
- }
- );
+ minX: x,
+ minY: y,
+ maxX: x + imgW,
+ maxY: y + imgH,
+ marker: job.marker,
+ isLabel: false
+ });
}
let [x, y] = this._iconPositions[markerId];
job.iconCenter = [x + imgW / 2, y + imgH / 2];
@@ -298,11 +301,13 @@ L.Layer.CanvasMarkers = L.GridLayer.extend({
this._labelPositions[markerId] = p;
let [x, y] = p;
this._regions.insert({
- minX: x, minY: y, maxX: x + textWidth, maxY: y + textHeight,
- marker: job.marker, isLabel: true
- }
- );
-
+ minX: x,
+ minY: y,
+ maxX: x + textWidth,
+ maxY: y + textHeight,
+ marker: job.marker,
+ isLabel: true
+ });
}
} else {
this._labelPositions[markerId] = null;
diff --git a/src/lib/leaflet.layer.geocaching-su/index.js b/src/lib/leaflet.layer.geocaching-su/index.js
@@ -59,7 +59,8 @@ const GeocachingSu = L.Layer.CanvasMarkers.extend({
latlng: {lat, lng},
_label: label,
label: getLabel,
- icon, cacheId
+ icon,
+ cacheId
}));
this.addMarkers(markers);
this._dataLoaded = true;
diff --git a/src/lib/leaflet.layer.soviet-topomaps-grid/index.js b/src/lib/leaflet.layer.soviet-topomaps-grid/index.js
@@ -216,20 +216,23 @@ L.Layer.SovietTopoGrid = L.LayerGroup.extend({
{'text': scaleString, header: true},
{'text': 'Click name to copy to clibpoard', header: true},
{
- 'text': titles[0], callback: () => {
- copyToClipboard(titles[0], e.originalEvent);
- }
+ 'text': titles[0],
+ callback: () => {
+ copyToClipboard(titles[0], e.originalEvent);
+ }
}
];
if (titles.length > 1) {
items.push({
- 'text': titles[1] + ' <span class="leaflet-sovietgrid-lang">RUS</span>', callback: () => {
+ 'text': titles[1] + ' <span class="leaflet-sovietgrid-lang">RUS</span>',
+ callback: () => {
copyToClipboard(titles[1], e.originalEvent);
}
}
);
items.push({
- 'text': titles[2] + ' <span class="leaflet-sovietgrid-lang">LAT</span>', callback: () => {
+ 'text': titles[2] + ' <span class="leaflet-sovietgrid-lang">LAT</span>',
+ callback: () => {
copyToClipboard(titles[2], e.originalEvent);
}
}