This commit is contained in:
2024-04-15 00:36:56 +02:00
parent 5548d30da8
commit e06119ba8c
2 changed files with 10 additions and 6 deletions

View File

@ -107,7 +107,6 @@ export class UserAPI {
pause: () => void;
stop: () => void;
silence: () => void;
onMouseMove: (e: MouseEvent) => void;
mouseX: () => number;
mouseY: () => number;
noteX: () => number;
@ -478,8 +477,15 @@ export class UserAPI {
: (this.app.selectedExample as string);
}
this.patternCache.clear();
this.stop();
this.play();
if (this.app.isPlaying) {
} else {
this.app.setButtonHighlighting("play", true);
this.app.isPlaying = !this.app.isPlaying;
this.app.clock.start();
this.app.api.MidiConnection.sendStartMessage();
}
// this.app.clock.start();
};
_stopDocExample = () => {
@ -616,7 +622,6 @@ export class UserAPI {
this.cueTimes[functionName] = this.app.clock.pulses_since_origin;
};
onmousemove = (e: MouseEvent) => {
this.app._mouseX = e.pageX;
this.app._mouseY = e.pageY;