From 5ebf3ddd96d2b6d49f7b7ede7eac9ad59197c6ba Mon Sep 17 00:00:00 2001 From: Simon <33069673+sschmidTU@users.noreply.github.com> Date: Mon, 6 Jul 2020 21:09:28 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#45811=20[vexflow]?= =?UTF-8?q?=20feat:=20add=20optional=20Formatter=20constructor=20options?= =?UTF-8?q?=20by=20@sschmidTU?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit update vexflow version number in comment Co-authored-by: sschmid --- types/vexflow/index.d.ts | 6 +++++- types/vexflow/vexflow-tests.ts | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/types/vexflow/index.d.ts b/types/vexflow/index.d.ts index 87510ffd4d..efffc990ca 100644 --- a/types/vexflow/index.d.ts +++ b/types/vexflow/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for VexFlow v1.2.88 +// Type definitions for VexFlow v3.0.9 // Project: http://vexflow.com // Definitions by: Roman Quiring // Sebastian Haas @@ -570,6 +570,10 @@ declare namespace Vex { class Formatter { static DEBUG: boolean; + constructor(options?: { + softmaxFactor?: number, + maxIterations?: number + }); static FormatAndDraw( ctx: IRenderContext, stave: Stave, diff --git a/types/vexflow/vexflow-tests.ts b/types/vexflow/vexflow-tests.ts index a7fdf7583b..b84f9d6551 100644 --- a/types/vexflow/vexflow-tests.ts +++ b/types/vexflow/vexflow-tests.ts @@ -46,7 +46,8 @@ var voice2 = new Vex.Flow.Voice(Vex.Flow.TIME4_4).addTickables([ ]); // Format and justify the notes to 550 pixels -var formatter = new Vex.Flow.Formatter().joinVoices([voice1, voice2]).format([voice1, voice2], 550); +var formatter = new Vex.Flow.Formatter({softmaxFactor: null, maxIterations: 2}) + .joinVoices([voice1, voice2]).format([voice1, voice2], 550); // Render stave stave.draw();