forked from MapComplete/MapComplete
Refactoring: move uploadGPXToOSm into svelte
This commit is contained in:
parent
7b9a748199
commit
34d8527718
9 changed files with 222 additions and 198 deletions
10
src/Utils/selectDefault.ts
Normal file
10
src/Utils/selectDefault.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { Store } from "../Logic/UIEventSource"
|
||||
|
||||
export function selectDefault(htmlElement: HTMLInputElement, value: Store<string>) {
|
||||
if (!document.body.contains(htmlElement) || value?.data === undefined) {
|
||||
return
|
||||
}
|
||||
if (value.data === htmlElement.value) {
|
||||
htmlElement.checked = true
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue