launchbar WIP

This commit is contained in:
zadam
2022-08-06 13:47:27 +02:00
parent 7696702a2a
commit 54900b35dc
5 changed files with 52 additions and 36 deletions

View File

@@ -3,18 +3,17 @@ import BasicWidget from "./basic_widget.js";
const TPL = `<div class="spacer"></div>`;
export default class SpacerWidget extends BasicWidget {
constructor(baseSize = 0, growIndex = 1000, shrinkIndex = 1000) {
constructor(baseSize = 0, growthFactor = 1000) {
super();
this.baseSize = baseSize;
this.growIndex = growIndex;
this.shrinkIndex = shrinkIndex;
this.growthFactor = growthFactor;
}
doRender() {
this.$widget = $(TPL);
this.$widget.css("flex-basis", this.baseSize);
this.$widget.css("flex-grow", this.growIndex);
this.$widget.css("flex-shrink", this.shrinkIndex);
this.$widget.css("flex-grow", this.growthFactor);
this.$widget.css("flex-shrink", 1000);
}
}