forked from MapComplete/MapComplete
Chore: cleanup of no longer needed code
This commit is contained in:
parent
67915e1c68
commit
8b426ac444
1 changed files with 0 additions and 17 deletions
|
@ -11,7 +11,6 @@ export default abstract class BaseUIElement {
|
||||||
protected isDestroyed = false
|
protected isDestroyed = false
|
||||||
protected readonly clss: Set<string> = new Set<string>()
|
protected readonly clss: Set<string> = new Set<string>()
|
||||||
protected style: string
|
protected style: string
|
||||||
private _onClick: () => void | Promise<void>
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds all the relevant classes, space separated
|
* Adds all the relevant classes, space separated
|
||||||
|
@ -80,22 +79,6 @@ export default abstract class BaseUIElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._onClick !== undefined) {
|
|
||||||
const self = this
|
|
||||||
el.onclick = async (e) => {
|
|
||||||
// @ts-ignore
|
|
||||||
if (e.consumed) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const v = self._onClick()
|
|
||||||
if (typeof v === "object") {
|
|
||||||
await v
|
|
||||||
}
|
|
||||||
// @ts-ignore
|
|
||||||
e.consumed = true
|
|
||||||
}
|
|
||||||
el.classList.add("cursor-pointer")
|
|
||||||
}
|
|
||||||
|
|
||||||
return el
|
return el
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue