ソースを参照

Merge branch 'develop'

sschmid 6 年 前
コミット
46befc1fa4

+ 3 - 3
.appveyor.yml

@@ -2,10 +2,10 @@ image: Visual Studio 2017
 environment:
   timeout: 4000
   matrix:
-    - nodejs_version: "6"
+    # - nodejs_version: "6"
     # - nodejs_version: "7"
-    - nodejs_version: "8" 
-    # - nodejs_version: "10"
+    # - nodejs_version: "8" 
+    - nodejs_version: "10"
 platform:
   # - x86
   - x64

+ 3 - 2
.travis.yml

@@ -2,8 +2,9 @@ sudo: required
 dist: trusty
 language: node_js
 node_js:
-- '6'
-- '8'
+# - '6'
+# - '8'
+- '10'
 env:
   - timeout=10000
 notifications:

+ 4 - 4
package.json

@@ -61,19 +61,19 @@
     "@types/loglevel": "^1.4.29",
     "@types/mocha": "^5.2.3",
     "chai": "^4.1.0",
-    "clean-webpack-plugin": "^1.0.0",
+    "clean-webpack-plugin": "^1.0.1",
     "cross-env": "^5.1.3",
     "cz-conventional-changelog": "^2.0.0",
-    "eslint": "^5.0.1",
+    "eslint": "^5.13.0",
     "eslint-config-standard": "^12.0.0",
-    "eslint-plugin-import": "^2.9.0",
+    "eslint-plugin-import": "^2.16.0",
     "eslint-plugin-node": "^8.0.0",
     "eslint-plugin-promise": "^4.0.1",
     "eslint-plugin-standard": "^4.0.0",
     "html-webpack-plugin": "^3.2.0",
     "http-server": "^0.11.0",
     "jquery": "^3.2.1",
-    "karma": "^3.1.3",
+    "karma": "^4.0.0",
     "karma-base64-to-js-preprocessor": "^0.0.1",
     "karma-chai": "^0.1.0",
     "karma-chrome-launcher": "^2.2.0",

+ 6 - 1
src/MusicalScore/Graphical/VexFlow/VexFlowConverter.ts

@@ -176,6 +176,7 @@ export class VexFlowConverter {
         let alignCenter: boolean = false;
         let xShift: number = 0;
         let slashNoteHead: boolean = false;
+        let isRest: boolean = false;
         for (const note of notes) {
             if (numDots < note.numberOfDots) {
                 numDots = note.numberOfDots;
@@ -183,6 +184,7 @@ export class VexFlowConverter {
 
             // if it is a rest:
             if (note.sourceNote.isRest()) {
+                isRest = true;
                 keys = ["b/4"];
                 // if it is a full measure rest:
                 if (note.parentVoiceEntry.parentStaffEntry.parentMeasure.parentSourceMeasure.Duration.RealValue <= frac.RealValue) {
@@ -196,7 +198,6 @@ export class VexFlowConverter {
                     xShift = EngravingRules.Rules.WholeRestXShiftVexflow * unitInPixels; // TODO find way to make dependent on the modifiers
                     // affects VexFlowStaffEntry.calculateXPosition()
                 }
-                duration += "r";
                 break;
             }
 
@@ -223,6 +224,10 @@ export class VexFlowConverter {
         if (slashNoteHead) {
             duration += "s"; // we have to specify a slash note head like this in Vexflow
         }
+        if (isRest) {
+            // "r" has to be put after the "d"s for rest notes.
+            duration += "r";
+        }
 
         let vfnote: Vex.Flow.StaveNote;
 

+ 3 - 1
src/OpenSheetMusicDisplay/OpenSheetMusicDisplay.ts

@@ -24,7 +24,8 @@ import {AbstractExpression} from "../MusicalScore/VoiceData/Expressions/Abstract
  * After the constructor, use load() and render() to load and render a MusicXML file.
  */
 export class OpenSheetMusicDisplay {
-    private version: string = "0.6.7-release"; // getter: this.Version
+    private version: string = "0.6.7-dev"; // getter: this.Version
+    // at release, bump version and change to -release, afterwards to -dev again
 
     /**
      * Creates and attaches an OpenSheetMusicDisplay object to an HTML element container.<br>
@@ -505,6 +506,7 @@ export class OpenSheetMusicDisplay {
     public get DrawingParameters(): DrawingParameters {
         return this.drawingParameters;
     }
+    /** Returns the version of OSMD this object is built from (the version you are using). */
     public get Version(): string {
         return this.version;
     }