frmatthew / exsurge

A JavaScript library for rendering Gregorian Chant in square note notation
MIT License
54 stars 13 forks source link

Feature/better fill last line #68

Closed bbloomf closed 8 years ago

bbloomf commented 8 years ago

I noticed that it still wasn't quite getting as many notations on the last line of the score as it could, and this pull request fixes that by ignoring the trailingSpace on the last notation

frmatthew commented 8 years ago

Regarding the trailingSpace: it makes more sense to me to simply set the last notation of the score to have a trailingSpace of 0; this could be done once when the notations are created in the Gabc code. This would avoid extra logic in the layout phase and eliminate some math operations from the layout loop too.

bbloomf commented 8 years ago

I tried doing that, but then it needs to get updated when calling updateMappingsFromSource(), so I thought it made more sense to handle it when laying out the line, since that way none of the layout would need to be updated if additional GABC code is added at the end, causing a notation to no longer be the last in the score.

frmatthew commented 8 years ago

Ah, true. OK, looks good as is, thx.