|
@@ -62,6 +62,7 @@ import { OpenSheetMusicDisplay } from '../src/OpenSheetMusicDisplay/OpenSheetMus
|
|
custom,
|
|
custom,
|
|
nextCursorBtn,
|
|
nextCursorBtn,
|
|
resetCursorBtn,
|
|
resetCursorBtn,
|
|
|
|
+ followCursorCheckbox,
|
|
showCursorBtn,
|
|
showCursorBtn,
|
|
hideCursorBtn,
|
|
hideCursorBtn,
|
|
backendSelect,
|
|
backendSelect,
|
|
@@ -85,6 +86,7 @@ import { OpenSheetMusicDisplay } from '../src/OpenSheetMusicDisplay/OpenSheetMus
|
|
canvas = document.createElement("div");
|
|
canvas = document.createElement("div");
|
|
nextCursorBtn = document.getElementById("next-cursor-btn");
|
|
nextCursorBtn = document.getElementById("next-cursor-btn");
|
|
resetCursorBtn = document.getElementById("reset-cursor-btn");
|
|
resetCursorBtn = document.getElementById("reset-cursor-btn");
|
|
|
|
+ followCursorCheckbox = document.getElementById("follow-cursor-checkbox");
|
|
showCursorBtn = document.getElementById("show-cursor-btn");
|
|
showCursorBtn = document.getElementById("show-cursor-btn");
|
|
hideCursorBtn = document.getElementById("hide-cursor-btn");
|
|
hideCursorBtn = document.getElementById("hide-cursor-btn");
|
|
backendSelect = document.getElementById("backend-select");
|
|
backendSelect = document.getElementById("backend-select");
|
|
@@ -195,6 +197,11 @@ import { OpenSheetMusicDisplay } from '../src/OpenSheetMusicDisplay/OpenSheetMus
|
|
resetCursorBtn.addEventListener("click", function() {
|
|
resetCursorBtn.addEventListener("click", function() {
|
|
openSheetMusicDisplay.cursor.reset();
|
|
openSheetMusicDisplay.cursor.reset();
|
|
});
|
|
});
|
|
|
|
+ if (followCursorCheckbox) {
|
|
|
|
+ followCursorCheckbox.onclick = function() {
|
|
|
|
+ openSheetMusicDisplay.FollowCursor = !openSheetMusicDisplay.FollowCursor;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
hideCursorBtn.addEventListener("click", function() {
|
|
hideCursorBtn.addEventListener("click", function() {
|
|
openSheetMusicDisplay.cursor.hide();
|
|
openSheetMusicDisplay.cursor.hide();
|
|
});
|
|
});
|