bring back the possibility to close the floating buttons again, closes #3116

This commit is contained in:
zadam
2022-09-18 14:57:44 +02:00
parent 84f72edf1d
commit d4658b9c2a
8 changed files with 95 additions and 35 deletions

View File

@@ -8,6 +8,28 @@ class BasicWidget extends Component {
style: ''
};
this.classes = [];
this.children = [];
this.childPositionCounter = 10;
}
child(...components) {
if (!components) {
return this;
}
super.child(...components);
for (const component of components) {
if (component.position === undefined) {
component.position = this.childPositionCounter;
this.childPositionCounter += 10;
}
}
this.children.sort((a, b) => a.position - b.position < 0 ? -1 : 1);
return this;
}
id(id) {