mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
🤖 Merge PR #45811 [vexflow] feat: add optional Formatter constructor options by @sschmidTU
update vexflow version number in comment Co-authored-by: sschmid <s.schmid@phonicscore.com>
This commit is contained in:
parent
47b4a51efb
commit
5ebf3ddd96
6
types/vexflow/index.d.ts
vendored
6
types/vexflow/index.d.ts
vendored
@ -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 <https://github.com/rquiring>
|
||||
// Sebastian Haas <https://github.com/sebastianhaas>
|
||||
@ -570,6 +570,10 @@ declare namespace Vex {
|
||||
|
||||
class Formatter {
|
||||
static DEBUG: boolean;
|
||||
constructor(options?: {
|
||||
softmaxFactor?: number,
|
||||
maxIterations?: number
|
||||
});
|
||||
static FormatAndDraw(
|
||||
ctx: IRenderContext,
|
||||
stave: Stave,
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user