Forráskód Böngészése

SvgVexFlowBackend: refactor const svg declaration (#608)

hopefully fixes svg being static between osmd instances (#608)
sschmid 5 éve
szülő
commit
e4f252f332

+ 2 - 1
src/MusicalScore/Graphical/VexFlow/SvgVexFlowBackend.ts

@@ -35,7 +35,8 @@ export class SvgVexFlowBackend extends VexFlowBackend {
         if (!this.ctx) {
             return;
         }
-        const { svg } = this.ctx;
+        //const { svg } = this.ctx; // seems to make svg static between osmd instances.
+        const svg: SVGElement = this.ctx.svg;
         // removes all children from the SVG element,
         // effectively clearing the SVG viewport
         while (svg.lastChild) {