diff --git a/src/UI/Base/SvelteUIElement.ts b/src/UI/Base/SvelteUIElement.ts index da3f32bd4..aea877b29 100644 --- a/src/UI/Base/SvelteUIElement.ts +++ b/src/UI/Base/SvelteUIElement.ts @@ -22,6 +22,7 @@ export default class SvelteUIElement< private readonly _props: Props private readonly _events: Events private readonly _slots: Slots + private tag : "div" | "span" = "div" constructor(svelteElement, props?: Props, events?: Events, slots?: Slots) { super() @@ -31,8 +32,13 @@ export default class SvelteUIElement< this._slots = slots } + public setSpan(){ + this.tag = "span" + return this + } + protected InnerConstructElement(): HTMLElement { - const el = document.createElement("div") + const el = document.createElement(this.tag) new this._svelteComponent({ target: el, props: this._props, diff --git a/src/UI/SpecialVisualizations.ts b/src/UI/SpecialVisualizations.ts index 9f240a458..652caa9cb 100644 --- a/src/UI/SpecialVisualizations.ts +++ b/src/UI/SpecialVisualizations.ts @@ -1017,7 +1017,7 @@ export default class SpecialVisualizations { state, feature, layer - }).SetClass("px-1") + }).SetClass("px-1").setSpan() }) ) }, @@ -1249,7 +1249,7 @@ export default class SpecialVisualizations { download: tagSource.map(tags => Utils.SubstituteKeys(download, tags)), ariaLabel: tagSource.map(tags => Utils.SubstituteKeys(ariaLabel, tags)), newTab: new ImmutableStore(newTab) - }) + }).setSpan() } }, {