widget: fix geometry style update (properly apply 'auto')
This commit is contained in:
parent
81af47ea9b
commit
8c37b06060
2 changed files with 10 additions and 4 deletions
|
|
@ -1,5 +1,10 @@
|
|||
# Changelog
|
||||
|
||||
## 0.41.2
|
||||
|
||||
- bug fixes
|
||||
- geometry properties not properly applied when reset to `auto`
|
||||
|
||||
## 0.41.1
|
||||
|
||||
- bug fixes
|
||||
|
|
|
|||
|
|
@ -780,11 +780,12 @@ class Widget extends EventEmitter {
|
|||
geometry = parseFloat(val) == val ? parseFloat(val)+'rem' : val
|
||||
}
|
||||
|
||||
if (geometry && geometry != 'auto') {
|
||||
if (geometry) {
|
||||
if (geometry === 'auto') geometry = ''
|
||||
this.container.style[d] = geometry
|
||||
if (d == 'width') this.container.style.minWidth = geometry
|
||||
if (d == 'height') this.container.style.minHeight = geometry
|
||||
if (d == 'top' || d == 'left') this.container.classList.add('absolute-position')
|
||||
if (d === 'width') this.container.style.minWidth = geometry
|
||||
if (d === 'height') this.container.style.minHeight = geometry
|
||||
if (d === 'top' || d === 'left') this.container.classList.add('absolute-position')
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue