feat: more styling, bug fixes, deleting rows, removing unnecessary features

This commit is contained in:
Daniel Ledda
2021-09-06 14:21:20 +02:00
parent 6b0395b453
commit 342e65345d
15 changed files with 225 additions and 129 deletions

View File

@@ -21,6 +21,7 @@ export const enum BeatEvents {
NewName="BE2",
DisplayTypeChanged="BE3",
LoopLengthChanged="BE4",
WantsRemoval="BE5",
}
export default class Beat implements IPublisher<BeatEvents>, BeatLike {
@@ -31,7 +32,7 @@ export default class Beat implements IPublisher<BeatEvents>, BeatLike {
private timeSigDown = 4;
private readonly unitRecord: BeatUnit[] = [];
private barCount = 1;
private publisher = new Publisher<BeatEvents>();
private publisher = new Publisher<BeatEvents, Beat>(this);
private loopLength: number;
private looping: boolean;
@@ -145,4 +146,8 @@ export default class Beat implements IPublisher<BeatEvents>, BeatLike {
getLoopLength(): number {
return this.loopLength;
}
delete(): void {
this.publisher.notifySubs(BeatEvents.WantsRemoval);
}
}