vexflow icon indicating copy to clipboard operation
vexflow copied to clipboard

EasyScore Time Option Doesn't Work

Open epihel opened this issue 1 year ago • 2 comments

Using Vexflow 4.2.5, passing a time signature to EasyScore doesn't override the default 4/4 time signature:

const factory = new Vex.Flow.Factory();
const vexScore = factory.EasyScore({ time: '3/4' });

EasyScore.defaults.time === '4/4'
EasyScore.options.time === '3/4'

Bug: Vexflow evaluates the score as 4/4 time.

This works:

const vexScore = factory.EasyScore();
vexScore.defaults.time = '3/4';

EasyScore.defaults.time === '3/4'
EasyScore.options.time === null

Vexflow evaluates the score as 3/4 time.

epihel avatar Aug 15 '24 23:08 epihel

Note that this also works: vexScore.set({ time: '3/4'});

epihel avatar Aug 15 '24 23:08 epihel

@epihel this is not a bug, the factory and constructor accept a EasyScoreOptions and set accepts a EasyScoreDefaults. time is a member of EasyScoreDefaults

rvilarl avatar Sep 10 '24 21:09 rvilarl

@rvilarl Ah, okay; I misunderstood the API. Feel free to close.

epihel avatar Sep 15 '24 23:09 epihel