Limit abcjs imports

This commit is contained in:
Benoit Schweblin 2018-09-01 18:22:53 +01:00
parent d2af43ac1c
commit 7828649b3f

View File

@ -1,4 +1,4 @@
import abcjs from 'abcjs'; import renderAbc from 'abcjs/src/api/abc_tunebook_svg';
import extensionSvc from '../services/extensionSvc'; import extensionSvc from '../services/extensionSvc';
const render = (elt) => { const render = (elt) => {
@ -8,7 +8,7 @@ const render = (elt) => {
divElt.className = 'abc-notation-block'; divElt.className = 'abc-notation-block';
// Replace the pre element with the div // Replace the pre element with the div
elt.parentNode.parentNode.replaceChild(divElt, elt.parentNode); elt.parentNode.parentNode.replaceChild(divElt, elt.parentNode);
abcjs.renderAbc(divElt, content, {}); renderAbc(divElt, content, {});
}; };
extensionSvc.onGetOptions((options, properties) => { extensionSvc.onGetOptions((options, properties) => {