瀏覽代碼

Fixed measure end clef size and width considerations.
Fixed lint errors

Matthias 8 年之前
父節點
當前提交
aa7c96d7bf

+ 1 - 3
demo/demo.js

@@ -92,7 +92,7 @@
                 canvas.width = width;
                 try {
                 sheet.render();
-                } catch (e) {};
+                } catch (e) {}
                 enable();
             }
         );
@@ -115,8 +115,6 @@
     }
 
     function Resize(startCallback, endCallback) {
-      "use strict";
-
       var rtime;
       var timeout = false;
       var delta = 200;

+ 0 - 1
src/MusicalScore/Graphical/VexFlow/VexFlowGraphicalSymbolFactory.ts

@@ -105,7 +105,6 @@ export class VexFlowGraphicalSymbolFactory implements IGraphicalSymbolFactory {
             }
             mynotes[voiceID].push(graphicalNote);
         }
-
         return graphicalNote;
     }
 

+ 2 - 2
src/MusicalScore/Graphical/VexFlow/VexFlowMeasure.ts

@@ -142,7 +142,7 @@ export class VexFlowMeasure extends StaffMeasure {
      */
     public addClefAtEnd(clef: ClefInstruction): void {
         let vfclef: {type: string, annotation: string} = VexFlowConverter.Clef(clef);
-        this.stave.setEndClef(vfclef.type, undefined, vfclef.annotation);
+        this.stave.setEndClef(vfclef.type, "small", vfclef.annotation);
         this.updateInstructionWidth();
     }
 
@@ -420,6 +420,6 @@ export class VexFlowMeasure extends StaffMeasure {
      */
     private updateInstructionWidth(): void {
         this.beginInstructionsWidth = (this.stave.getNoteStartX() - this.stave.getX()) / unitInPixels;
-        this.endInstructionsWidth = (this.stave.getNoteEndX() - this.stave.getX()) / unitInPixels;
+        this.endInstructionsWidth = (this.stave.getX() + this.stave.getWidth() - this.stave.getNoteEndX()) / unitInPixels;
     }
 }