فهرست منبع

comments

try to avoid too long lines
in OSMDOptions
sschmidTU 4 سال پیش
والد
کامیت
8adda58756
1فایلهای تغییر یافته به همراه24 افزوده شده و 13 حذف شده
  1. 24 13
      src/OpenSheetMusicDisplay/OSMDOptions.ts

+ 24 - 13
src/OpenSheetMusicDisplay/OSMDOptions.ts

@@ -12,9 +12,13 @@ import { FontStyles } from "../Common/Enums/FontStyles";
 export interface IOSMDOptions {
     /** Whether to let Vexflow align rests to preceding or following notes (Vexflow option). Default false (0).
      * This can naturally reduce collisions of rest notes with other notes.
-     * Auto mode (2) only aligns rests when there are multiple voices in a measure, and at least once at the same x-coordinate.
-     * Auto is the recommended setting, and would be default, if it couldn't in rare cases deteriorate rest placement for existing users.
-     * The on mode (1) always aligns rests, also changing their position when there is no simultaneous note at the same x-coordinate, which is nonstandard.
+     * Auto mode (2) only aligns rests when there are multiple voices in a measure,
+     * and at least once at the same x-coordinate.
+     * Auto is the recommended setting, and would be default,
+     * if it couldn't in rare cases deteriorate rest placement for existing users.
+     * The on mode (1) always aligns rests,
+     * also changing their position when there is no simultaneous note at the same x-coordinate,
+     * which is nonstandard.
      */
     alignRests?: AlignRestOption | number;
     /** Whether to automatically create beams for notes that don't have beams set in XML. */
@@ -51,8 +55,10 @@ export interface IOSMDOptions {
     /** Default color for labels in the title. Overrides defaultColorLabel for title labels like composer. Default black (undefined). */
     defaultColorTitle?: string;
     /** Default font used for text and labels, e.g. title or lyrics. Default Times New Roman
-     * Note that OSMD originally always used Times New Roman, so things like layout and spacing may still be optimized for it.
-     * Valid options are CSS font families available in the browser used for rendering, e.g. Times New Roman, Helvetica.
+     * Note that OSMD originally always used Times New Roman,
+     * so things like layout and spacing may still be optimized for it.
+     * Valid options are CSS font families available in the browser used for rendering, 
+     * e.g. Times New Roman, Helvetica.
      */
     defaultFontFamily?: string;
     /** Default font style, e.g. FontStyles.Bold (1). Default Regular (0). */
@@ -86,7 +92,8 @@ export interface IOSMDOptions {
     /** Whether to draw part (instrument) name abbreviations each system after the first. Only draws if drawPartNames. Default true. */
     drawPartAbbreviations?: boolean;
     /** Whether to draw measure numbers (labels). Default true.
-     * Draws a measure number label at first measure, system start measure, and every [measureNumberInterval] measures.
+     * Draws a measure number label at first measure, system start measure,
+     * and every [measureNumberInterval] measures.
      * See the [measureNumberInterval] option, default is 2.
      */
     drawMeasureNumbers?: boolean;
@@ -135,15 +142,18 @@ export interface IOSMDOptions {
      * (Bracketing all triplets can be cluttering)
      */
     tripletsBracketed?: boolean;
-    /**  See OpenSheetMusicDisplay.PageFormatStandards for standard options like "A4 P" or "Endless". Default Endless.
-     *   Uses OpenSheetMusicDisplay.StringToPageFormat(). Unfortunately it would be error-prone to set a PageFormat type directly.
+    /** See OpenSheetMusicDisplay.PageFormatStandards for standard options like "A4 P" or "Endless".
+     *  Default Endless.
+     *  Uses OpenSheetMusicDisplay.StringToPageFormat().
+     *  Unfortunately it would be error-prone to set a PageFormat type directly.
      */
     pageFormat?: string;
     /** A custom page/canvas background color. Default undefined/transparent.
      *  Example: "#FFFFFF" = white. "#12345600" = transparent.
-     *  This can be useful when you want to export an image with e.g. white background color instead of transparent,
-     *  from a CanvasBackend.
-     *  Note: Using a background color will prevent the cursor from being visible for now (will be fixed at some point).
+     *  This can be useful when you want to export an image with e.g. white background color
+     * instead of transparent, from a CanvasBackend.
+     *  Note: Using a background color will prevent the cursor from being visible for now
+     * (will be fixed at some point).
      */
     pageBackgroundColor?: string;
     /** This makes OSMD render on one single horizontal (staff-)line.
@@ -157,8 +167,9 @@ export interface IOSMDOptions {
      */
     newSystemFromXML?: boolean;
     /** Whether to begin a new page ("page break") when given in XML ('new-page="yes"').
-     *  Default false, because OSMD does its own layout that will do page breaks interactively (when given a PageFormat)
-     *  at different measures. So this option may result in a page break after a single measure on a page.
+     *  Default false, because OSMD does its own layout that will do page breaks interactively
+     * (when given a PageFormat) at different measures.
+     * So this option may result in a page break after a single measure on a page.
      */
     newPageFromXML?: boolean;
     /** The cutoff number for rendering percussion clef stafflines as a single line. Default is 4.