From e06119ba8c79d7ac93d701960baf6abcc3309302 Mon Sep 17 00:00:00 2001 From: Raphael Forment Date: Mon, 15 Apr 2024 00:36:56 +0200 Subject: [PATCH] fix --- src/API/API.ts | 13 +++++++++---- src/Docs/Documentation.ts | 3 +-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/API/API.ts b/src/API/API.ts index 72f826e..4570934 100644 --- a/src/API/API.ts +++ b/src/API/API.ts @@ -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; diff --git a/src/Docs/Documentation.ts b/src/Docs/Documentation.ts index 3c5f0b9..be65f5a 100644 --- a/src/Docs/Documentation.ts +++ b/src/Docs/Documentation.ts @@ -54,8 +54,7 @@ export const makeExampleFactory = (application: Editor): Function => {
${code.trim()}
- -`; + `; }; return make_example; };