Change environment, fix some linting errors

This commit is contained in:
Robin van der Linde 2023-07-27 14:48:17 +02:00
parent 9885099aff
commit b9d38c958c
No known key found for this signature in database
GPG key ID: 53956B3252478F0D
4 changed files with 8 additions and 3 deletions

View file

@ -20,4 +20,8 @@ module.exports = {
],
plugins: ["@typescript-eslint"],
root: true,
env: {
browser: true,
node: true,
},
}

View file

@ -16,7 +16,7 @@ export class OpenJosm extends Combine {
const josmState = new UIEventSource<string>(undefined)
// Reset after 15s
josmState.stabilized(15000).addCallbackD((_) => josmState.setData(undefined))
josmState.stabilized(15000).addCallbackD(() => josmState.setData(undefined))
const stateIndication = new VariableUiElement(
josmState.map((state) => {
@ -45,7 +45,7 @@ export class OpenJosm extends Combine {
const josmLink = `http://127.0.0.1:8111/load_and_zoom?left=${left}&right=${right}&top=${top}&bottom=${bottom}`
Utils.download(josmLink)
.then((answer) => josmState.setData(answer.replace(/\n/g, "").trim()))
.catch((_) => josmState.setData("ERROR"))
.catch(() => josmState.setData("ERROR"))
})
.SetClass("w-full"),
undefined,

View file

@ -1,3 +1,4 @@
/* eslint-disable prefer-const */
import { VariableUiElement } from "../Base/VariableUIElement"
import { Translation } from "../i18n/Translation"
import Svg from "../../Svg"

View file

@ -81,7 +81,7 @@
mimetype="image/png"
mainText={t.downloadAsPng}
helperText={t.downloadAsPngHelper}
construct={(_) => state.mapProperties.exportAsPng(4)}
construct={() => state.mapProperties.exportAsPng(4)}
/>
<div class="flex flex-col">