new fix for switching beats
This commit is contained in:
@@ -29,10 +29,8 @@ export default class TrackView extends Rung implements ISubscriber<EventTypeSubs
|
|||||||
|
|
||||||
constructor(options: TrackUINodeOptions) {
|
constructor(options: TrackUINodeOptions) {
|
||||||
super(options);
|
super(options);
|
||||||
|
this.title = <h3></h3> as HTMLHeadingElement;
|
||||||
this.setTrack(options.track);
|
this.setTrack(options.track);
|
||||||
this.title = <h3
|
|
||||||
innerText={this.track.getName()}>
|
|
||||||
</h3> as HTMLHeadingElement;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getTitleNode(): HTMLHeadingElement {
|
getTitleNode(): HTMLHeadingElement {
|
||||||
@@ -43,6 +41,7 @@ export default class TrackView extends Rung implements ISubscriber<EventTypeSubs
|
|||||||
if (track) {
|
if (track) {
|
||||||
this.track = track;
|
this.track = track;
|
||||||
this.sub?.unbind();
|
this.sub?.unbind();
|
||||||
|
this.title.innerText = this.track.getName();
|
||||||
this.sub = this.track.addSubscriber(this, EventTypeSubscriptions);
|
this.sub = this.track.addSubscriber(this, EventTypeSubscriptions);
|
||||||
this.redraw();
|
this.redraw();
|
||||||
} else {
|
} else {
|
||||||
@@ -164,4 +163,4 @@ export default class TrackView extends Rung implements ISubscriber<EventTypeSubs
|
|||||||
window.addEventListener("mouseup", () => {
|
window.addEventListener("mouseup", () => {
|
||||||
TrackView.selectingUnits = false;
|
TrackView.selectingUnits = false;
|
||||||
TrackView.deselectingUnits = false;
|
TrackView.deselectingUnits = false;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user