fix: trying to fix jenkins
Some checks failed
Gitea djledda.de/arne-drums/pipeline/head There was a failure building this commit
Some checks failed
Gitea djledda.de/arne-drums/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -11,8 +11,9 @@ export type BeatSettingsViewUINodeOptions = UINodeOptions & {
|
||||
export default class BeatSettingsView extends UINode implements ISubscriber {
|
||||
private beat: Beat;
|
||||
private visible = false;
|
||||
private timeSigUp: HTMLInputElement | null = null;
|
||||
private timeSigDown: HTMLInputElement | null = null;
|
||||
private timeSigUp: HTMLInputElement;
|
||||
private timeSigDown: HTMLInputElement;
|
||||
private barCountInput: HTMLInputElement;
|
||||
|
||||
constructor(options: BeatSettingsViewUINodeOptions) {
|
||||
super(options);
|
||||
@@ -26,10 +27,10 @@ export default class BeatSettingsView extends UINode implements ISubscriber {
|
||||
|
||||
notify<T extends string | number>(publisher: IPublisher<T>, event: "all" | T[] | T) {
|
||||
if (event === BeatEvents.NewTimeSig) {
|
||||
if (this.timeSigUp && this.timeSigDown) {
|
||||
this.timeSigUp.value = this.beat.getTimeSigUp().toString();
|
||||
this.timeSigDown.value = this.beat.getTimeSigDown().toString();
|
||||
}
|
||||
this.timeSigUp.value = this.beat.getTimeSigUp().toString();
|
||||
this.timeSigDown.value = this.beat.getTimeSigDown().toString();
|
||||
} else if (event === BeatEvents.NewBarCount) {
|
||||
this.barCountInput.value = this.beat.getBarCount();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,9 +48,19 @@ export default class BeatSettingsView extends UINode implements ISubscriber {
|
||||
}
|
||||
|
||||
rebuild(): HTMLElement {
|
||||
this.timeSigUp = UINode.make("input", {});
|
||||
this.timeSigUp.addEventListener("input",
|
||||
(event) => this.beat.setTimeSignature({
|
||||
up: Number((event.target as HTMLInputElement).value) }));
|
||||
this.timeSigDown = UINode.make("input", {});
|
||||
this.timeSigDown.addEventListener("input",
|
||||
(event) => this.beat.setTimeSignature({
|
||||
down: Number((event.target as HTMLInputElement).value) }));
|
||||
this.node = UINode.make("div", {
|
||||
subs: [
|
||||
UINode.make("p", {innerText: `Settings for ${this.beat.getName()}`}),
|
||||
this.timeSigUp,
|
||||
this.timeSigDown,
|
||||
],
|
||||
classes: ["beatSettingsView"]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user