فهرست منبع

Fixed x layout of systems.
added a test-cursor given by a fraction.

Matthias 9 سال پیش
والد
کامیت
96a6604e3e
2فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 1 0
      src/MusicalScore/Graphical/VexFlow/VexFlowMusicSheetCalculator.ts
  2. 5 0
      src/OSMD/OSMD.ts

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

@@ -149,6 +149,7 @@ export class VexFlowMusicSheetCalculator extends MusicSheetCalculator {
                     }
                     // set y positions of systems using the previous system and a fixed distance.
                     musicSystem.PositionAndShape.BorderBottom = y + 0;
+                    musicSystem.PositionAndShape.RelativePosition.x = this.rules.PageLeftMargin + this.rules.SystemLeftMargin;
                     musicSystem.PositionAndShape.RelativePosition.y = globalY;
                     globalY += y + 5;
                 }

+ 5 - 0
src/OSMD/OSMD.ts

@@ -11,6 +11,9 @@ import {Promise} from "es6-promise";
 import {handleResize} from "./ResizeHandler";
 import {ajax} from "./AJAX";
 import {Logging} from "../Common/Logging";
+import {GraphicalLine} from "../MusicalScore/Graphical/GraphicalLine";
+import {Fraction} from "../Common/DataObjects/Fraction";
+import {OutlineAndFillStyleEnum} from "../MusicalScore/Graphical/DrawingEnums";
 
 export class OSMD {
     /**
@@ -137,6 +140,8 @@ export class OSMD {
         this.sheet.pageWidth = width / this.zoom / 10.0;
         // Calculate again
         this.graphic.reCalculate();
+        this.graphic.Cursors.length = 0;
+        this.graphic.Cursors.push(this.graphic.calculateCursorLineAtTimestamp(new Fraction(7,1), OutlineAndFillStyleEnum.PlaybackCursor));
         // Update Sheet Page
         let height: number = this.graphic.MusicPages[0].PositionAndShape.BorderBottom * 10.0 * this.zoom;
         this.drawer.resize(width, height);