Skip to content

Commit

Permalink
BREAKING CHANGE(verovio): import verovio hosted on the verovio develo…
Browse files Browse the repository at this point in the history
…p website

Refs: #1215
  • Loading branch information
yinanazhou committed May 23, 2024
1 parent 6bc9c41 commit ae50bdb
Showing 1 changed file with 18 additions and 26 deletions.
44 changes: 18 additions & 26 deletions src/workers/VerovioWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,23 @@ function handleNeonEvent (evt) {
postMessage(result);
}

var Module = {
onRuntimeInitialized: () => {
importScripts('https://www.verovio.org/javascript/develop/verovio-toolkit-wasm.js');

toolkit = new verovio.toolkit();
toolkit.setOptions({
inputFrom: 'mei',
footer: 'none',
header: 'none',
pageMarginLeft: 0,
pageMarginTop: 0,
font: 'Bravura',
useFacsimile: false,
});
console.debug('READY');
onmessage = handleNeonEvent;
for (const message of backlog) {
handleNeonEvent(message);
}
}
};

importScripts('../assets/js/verovio-toolkit.js');
verovio.module.onRuntimeInitialized = () => {

function tempHandler (evt) {
backlog.push(evt);
}

onmessage = tempHandler;
toolkit = new verovio.toolkit();
toolkit.setOptions( {
inputFrom: 'mei',
footer: 'none',
header: 'none',
pageMarginLeft: 0,
pageMarginTop: 0,
font: 'Bravura',
useFacsimile: false,
});
console.debug('READY');
onmessage = handleNeonEvent;
for (const message of backlog) {
handleNeonEvent(message);
}
};

0 comments on commit ae50bdb

Please sign in to comment.