Browse Source

feat(Octavas use vexflow types now): Using types from Definitely typed

Benjamin Giesinger 6 years ago
parent
commit
53f2c44f82
2 changed files with 2 additions and 2 deletions
  1. 1 1
      package.json
  2. 1 1
      src/MusicalScore/Graphical/VexFlow/CanvasVexFlowBackend.ts

+ 1 - 1
package.json

@@ -52,7 +52,7 @@
     "jszip": "^3.0.0",
     "loglevel": "^1.5.0",
     "typescript-collections": "^1.1.2",
-    "@types/vexflow": "^1.2.32",
+    "@types/vexflow": "^1.2.33",
     "vexflow": "^1.2.87"
   },
   "devDependencies": {

+ 1 - 1
src/MusicalScore/Graphical/VexFlow/CanvasVexFlowBackend.ts

@@ -118,6 +118,6 @@ export class CanvasVexFlowBackend extends VexFlowBackend {
         // This clusterfuck is only there to counter act my favorite vexflow line:
         // ctx.vexFlowCanvasContext = ctx;
         // No idea why they are saving the context but we wrap the types here
-        return <CanvasRenderingContext2D>(ctx as any).vexFlowCanvasContext;
+        return <CanvasRenderingContext2D>(this.ctx as any).vexFlowCanvasContext;
     }
 }