new fix for switching beats

This commit is contained in:
Daniel Ledda
2023-01-03 12:18:48 +01:00
parent 4e0784ce07
commit fdd59cdf56

View File

@@ -29,10 +29,8 @@ export default class TrackView extends Rung implements ISubscriber<EventTypeSubs
constructor(options: TrackUINodeOptions) {
super(options);
this.title = <h3></h3> as HTMLHeadingElement;
this.setTrack(options.track);
this.title = <h3
innerText={this.track.getName()}>
</h3> as HTMLHeadingElement;
}
getTitleNode(): HTMLHeadingElement {
@@ -43,6 +41,7 @@ export default class TrackView extends Rung implements ISubscriber<EventTypeSubs
if (track) {
this.track = track;
this.sub?.unbind();
this.title.innerText = this.track.getName();
this.sub = this.track.addSubscriber(this, EventTypeSubscriptions);
this.redraw();
} else {
@@ -164,4 +163,4 @@ export default class TrackView extends Rung implements ISubscriber<EventTypeSubs
window.addEventListener("mouseup", () => {
TrackView.selectingUnits = false;
TrackView.deselectingUnits = false;
});
});