mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-11-01 12:17:18 +00:00
lint fixes
This commit is contained in:
1 parent
f5a2db0565
commit
6956c19410
45 files changed
+243
-244
No files matched your search
@@ -19,7 +19,7 @@ export class BoundsManager {
|
||||
this.fitBoundsOnLoad(Array.from(newFiles.keys()));
|
||||
}
|
||||
},
|
||||
(fileId) => {},
|
||||
() => {},
|
||||
() => {}
|
||||
);
|
||||
}
|
||||
@@ -40,7 +40,7 @@ export class BoundsManager {
|
||||
}
|
||||
});
|
||||
},
|
||||
(fileId) => {},
|
||||
() => {},
|
||||
() => {}
|
||||
);
|
||||
}
|
||||
@@ -51,7 +51,7 @@ export class BoundsManager {
|
||||
this._files.delete(fileId);
|
||||
|
||||
if (file.statistics.bounds) {
|
||||
let bounds = new LngLatBounds([
|
||||
const bounds = new LngLatBounds([
|
||||
file.statistics.bounds.west,
|
||||
file.statistics.bounds.south,
|
||||
file.statistics.bounds.east,
|
||||
|
||||
@@ -36,10 +36,10 @@ export class MapCursor {
|
||||
constructor() {
|
||||
this._states = writable(new Set());
|
||||
this._states.subscribe((states) => {
|
||||
let state = Array.from(states.values()).reduce((max, value) => {
|
||||
const state = Array.from(states.values()).reduce((max, value) => {
|
||||
return value > max ? value : max;
|
||||
}, MapCursorState.DEFAULT);
|
||||
let canvas = get(map)?.getCanvas();
|
||||
const canvas = get(map)?.getCanvas();
|
||||
if (canvas) {
|
||||
canvas.style.cursor = cursorStyles[state];
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ export function getArrayValidator<V>(allowed: V[]) {
|
||||
|
||||
export function getLayerValidator(allowed: Record<string, any>, fallback: string) {
|
||||
return (layer: string) =>
|
||||
allowed.hasOwnProperty(layer) ||
|
||||
Object.hasOwn(allowed, layer) ||
|
||||
layer.startsWith('custom-') ||
|
||||
layer.startsWith('extension-')
|
||||
? layer
|
||||
|
||||
@@ -10,7 +10,6 @@ import {
|
||||
defaultTerrainSource,
|
||||
overpassTree,
|
||||
type CustomLayer,
|
||||
type LayerTreeType,
|
||||
} from '$lib/data/layers';
|
||||
import { browser } from '$app/environment';
|
||||
import type { DistanceUnits, TemperatureUnits, VelocityUnits } from '$lib/units/conversions';
|
||||
|
||||
Reference in new issue
Block a user