mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
cleanup when auto-size changes
This commit is contained in:
@@ -330,10 +330,14 @@ export default class SlPopup extends ShoelaceElement {
|
||||
apply: ({ availableWidth, availableHeight }) => {
|
||||
if (this.autoSize === 'vertical' || this.autoSize === 'both') {
|
||||
this.style.setProperty('--auto-size-available-height', `${availableHeight}px`);
|
||||
} else {
|
||||
this.style.removeProperty('--auto-size-available-height');
|
||||
}
|
||||
|
||||
if (this.autoSize === 'horizontal' || this.autoSize === 'both') {
|
||||
this.style.setProperty('--auto-size-available-width', `${availableWidth}px`);
|
||||
} else {
|
||||
this.style.removeProperty('--auto-size-available-width');
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user