forked from MapComplete/MapComplete
ToSvelte will now bind directly to svelte in the case that a SvelteUIElement is passed. This helps with cleaning up MapLibre maps, which should help with #2024
This commit is contained in:
parent
7038fcc6f6
commit
7d678d95c7
4 changed files with 54 additions and 18 deletions
|
|
@ -63,7 +63,7 @@ export default abstract class BaseUIElement {
|
|||
/**
|
||||
* Adds all the relevant classes, space separated
|
||||
*/
|
||||
public SetClass(clss: string) {
|
||||
public SetClass(clss: string): this {
|
||||
if (clss == undefined) {
|
||||
return this
|
||||
}
|
||||
|
|
@ -101,7 +101,7 @@ export default abstract class BaseUIElement {
|
|||
return this.clss.has(clss)
|
||||
}
|
||||
|
||||
public SetStyle(style: string): BaseUIElement {
|
||||
public SetStyle(style: string): this {
|
||||
this.style = style
|
||||
if (this._constructedHtmlElement !== undefined) {
|
||||
this._constructedHtmlElement.style.cssText = style
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue