modal: fix visible property (add Widget.childrenVisible() handle this kind of exceptions properly)

This commit is contained in:
bordun 2021-01-17 18:38:39 +01:00
parent 148c43a369
commit 863398c2e1
4 changed files with 19 additions and 4 deletions

View file

@ -100,6 +100,13 @@ class ColorPicker extends UiWidget {
}
childrenVisible() {
return true
}
setName(n = '') {
this.name = n

View file

@ -1065,7 +1065,13 @@ class Widget extends EventEmitter {
isVisible() {
return this.getProp('visible') && this.parent.isVisible()
return this.getProp('visible') && this.parent.childrenVisible()
}
childrenVisible() {
return this.isVisible()
}

View file

@ -127,9 +127,9 @@ class Modal extends Panel {
}
isVisible() {
childrenVisible() {
return this.init && this.value && super.isVisible()
return this.init && this.value && this.isVisible()
}