0xfe/vexflow — pull request #34 by LarryKu (2011-11-04 19:46:27+00:00)
Title: Modified Formatter That Formats Multiple Staves

Modifications to the formatter and supporting classes to align tablature
with the notation and enable formatting voices from multiple staves. Below
is a summary of the modified classes, tests and web pages included in this
commit.

Classes (src/)
==============

accidental.js :: Removed redundant functions defined in modifier.js
beam.js :: Shorten stems by 3 picels when note head is a harmonic
bend.js :: Changed text width calculation from textWidth() to
measureText()
dot.js :: Removed redundant functions defined in modifier.js
formatter.js :: FormatAndDrawTab() - reversed order of noteVoices and
tabVoices so stave notes formatted first
:: preFormat() - completely recoded to layout notes with
left justification
modifier.js :: added setYShift() function
modifiercontext.js :: new functions formatNotesByY() and formatAccidentalsByY()
to enable formatting of more than two voices (multiple
staves)
:: Fixed accidentals drawing over note heads for displaced
notes with downward stems
note.js :: Added getMetrics() to get note onfo needed for formatting
stave.js :: Added option for no vertical barline
stavebarline.js :: Added "NONE" as a barline option
staveconnector.js :: Added single line, brace and brackets stave connectors
stavenote.js :: Sorted notes during init to ensure they are in correct
sequence by line plus minor changes for new formatter
tabnote.js :: Various changes to support new formatter
tabslide.js :: draw() mod to draw consistent slide lines in tablature
tickable.js :: addToModifierContext() did not use correct variable name
tickcontext.js :: Added variable to support getting tickcontext metrics for
new formatter
timesignature.js :: Corrected constructor definition from KeySignature to
TimeSignature

New Class (src/)
================
articulation.js :: Class to draw articulations in notation

TabDiv (tabdiv/)
================
tutorial.html :: Increased width Steps 5 & 6 so notation would display

Tests (tests/)
==============
flow.html :: Added articulation & staveconnector tests
articulation_tests.js :: New test for articulations
beam_tests.js :: Made stave width larger
bend_tests.js :: fixed spacing of reverse bends
formatter_tests.js :: Added multiple system format test
mocks.js :: added tickable.getMetrics() function
staveconnector_tests.js :: Tests for the various stave connectors