Optionaloptions: TickContextOptionsProtectedcurrentProtectedformatterProtectedglyphProtectedleftProtected OptionalmaxProtectedmaxProtected OptionalminProtected OptionalminProtectedmodProtectedmodProtectednoteProtectedpaddingProtectedpostProtectedpreProtectedrightProtected ReadonlytickablesProtected ReadonlytickablesProtected ReadonlytickIDProtectedtotalProtectedtotalProtectedwidthProtectedxProtectedxProtectedxOptionalvoiceIndex: numberLike getDeviationCost, but averages the cost of space deviations so that TickContexts with more Tickables are not weighted more heavily.
Return the total cost of space deviations from formatter metrics for each tickable in the context. Used by formatters.
Since FormatterMetrics.space.deviation is the amount each tickable is smaller (negative) or wider (positive) than the mean amount of space allocated to that duration, a negative return value means the tickables at this position are on average getting less space than they should, while a positive number means they are getting more space than they should.
Gets widths context, note and left/right modifiers for formatting.
Introduced on 2020-04-17 as getTickablesForVoice(voiceIndex). https://github.com/0xfe/vexflow/blame/dc97b0cc5bb93171c0038638c34362dc958222ca/src/tickcontext.js#L63 Renamed on 2021-08-05 to getTickableForVoice(voiceIndex). Method renamed to singular, since it returns one Tickable.
Move this tick context by shift pixels rightward, and adjust the
freedom on adjacent tickcontexts.
pixels to shift rightward.
Optionalprev: TickContextthe previous TickContext, whose right freedom will be increased by shift.
Optionalnext: TickContextthe next TickContext, whose left freedom will be decreased by shift.
StaticgetGet the next TickContext from another TickContext, from the .tContexts array.
TickContext formats abstract tickable objects, such as notes, chords, tabs, etc.
It has a public attribute of
tContextswhich is a parent array of the TickContexts in which this TickContext belongs.