strip: regression from dynamic editing: handle geometry coerce differently to avoid layout bugs

This commit is contained in:
jean-emmanuel 2019-01-07 22:59:09 +01:00
parent 6873e1fdf1
commit cb95244948
4 changed files with 13 additions and 9 deletions

View file

@ -3,7 +3,8 @@
## 0.41.2
- bug fixes
- geometry properties not properly applied when reset to `auto`
- geometry properties not properly applied when reset to `auto`
- `strip` layout not properly applied when changing the widget's `horizontal` property
## 0.41.1

View file

@ -421,6 +421,11 @@ var Editor = class Editor {
} else {
if (widget.parent !== widgetManager && widget.parent.getProp('type') === 'strip') {
// special case for widgets in strips
if (propName === 'top' || propName === 'left' || propName === (widget.parent.getProp('horizontal') ? 'height' : 'width')) continue
}
field = editField(this, widget, propName, props[propName])
if (!field) continue
@ -474,7 +479,7 @@ var Editor = class Editor {
}
if (widget.props.top !== undefined) {
if (widget.props.top !== undefined && widget.parent.getProp('type') !== 'strip') {
let $container = $(widget.container)
$container.draggable({
cursor:'-webkit-grabbing',

View file

@ -142,13 +142,6 @@ class Widget extends EventEmitter {
this.children = []
this.reCreateOptions = options.reCreateOptions
// strip parent ? no position
if (this.parent && this.parent.props && this.parent.props.type == 'strip') {
delete this.props.top
delete this.props.left
delete this.props[this.parent.getProp('horizontal') ? 'height' : 'width']
}
this.createPropsCache()
if (this.getProp('id') == 'root' && !options.root) {

View file

@ -128,6 +128,11 @@
> .panel {
--spacing: 0;
> .widget {
top:auto!important;
left:auto!important;
position: relative!important;
}
}
&.vertical {