feat: more ui, looping
This commit is contained in:
@@ -6,12 +6,10 @@ import "./Root.css";
|
||||
export type RootUINodeOptions = UINodeOptions & {
|
||||
title: string,
|
||||
mainBeatGroup: BeatGroup,
|
||||
parent: HTMLElement,
|
||||
};
|
||||
|
||||
export default class RootView extends UINode {
|
||||
private title: string;
|
||||
protected parent: HTMLElement;
|
||||
private beatGroupView: BeatGroupView;
|
||||
private mainBeatGroup: BeatGroup;
|
||||
|
||||
@@ -20,8 +18,6 @@ export default class RootView extends UINode {
|
||||
this.beatGroupView = new BeatGroupView({title: "THE BEAT", beatGroup: options.mainBeatGroup});
|
||||
this.mainBeatGroup = options.mainBeatGroup;
|
||||
this.title = options.title;
|
||||
this.parent = options.parent;
|
||||
this.rebuild();
|
||||
}
|
||||
|
||||
rebuild(): HTMLDivElement {
|
||||
@@ -29,7 +25,7 @@ export default class RootView extends UINode {
|
||||
classes: ["root"],
|
||||
subs: [
|
||||
UINode.make("h1", {innerText: this.title, classes: ["title"]}),
|
||||
this.beatGroupView.rebuild(),
|
||||
this.beatGroupView.render(),
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user