diff --git a/lib/components/controls/custom.control.ts b/lib/components/controls/custom.control.ts index 1f15d98..7df81bb 100644 --- a/lib/components/controls/custom.control.ts +++ b/lib/components/controls/custom.control.ts @@ -36,7 +36,7 @@ export default defineComponent({ */ class: { type: String as PropType, - default: 'maplibregl-ctrl maplibregl-ctrl-group', + default: "maplibregl-ctrl maplibregl-ctrl-group", }, }, slots: Object as SlotsType<{ default: unknown }>, diff --git a/lib/components/popup.component.ts b/lib/components/popup.component.ts index dd3b872..47c2edd 100644 --- a/lib/components/popup.component.ts +++ b/lib/components/popup.component.ts @@ -172,6 +172,17 @@ export default defineComponent({ () => props.maxWidth, (v) => popup.setMaxWidth(v), ); + watch( + () => props.className, + (value, previous) => { + if (previous) { + popup.removeClassName(p); + } + if (value) { + popup.addClassName(v); + } + }, + ); watch( () => props.subpixelPositioning, (v) => popup.setSubpixelPositioning(v),