Change environment, fix some linting errors
This commit is contained in:
parent
9885099aff
commit
b9d38c958c
4 changed files with 8 additions and 3 deletions
|
@ -20,4 +20,8 @@ module.exports = {
|
|||
],
|
||||
plugins: ["@typescript-eslint"],
|
||||
root: true,
|
||||
env: {
|
||||
browser: true,
|
||||
node: true,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable prefer-const */
|
||||
import { VariableUiElement } from "../Base/VariableUIElement"
|
||||
import { Translation } from "../i18n/Translation"
|
||||
import Svg from "../../Svg"
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in a new issue