dhowe/RiTaJS — pull request #7 by BooDoo (2013-05-23 05:53:08+00:00)
Title: Fix Examples (particularly canvas)

`/src/rita.js`:
- Re-enabled `RiText.defaultAlignment`
- Added `RiText.prototype.color()` as used in `www/examples/canvas/simplest.html`
- Added `RiText.showBoundingBox()` setting a valule in `RiText.defaults`
- Catch undefined when trimming whitespace in `RiGrammar.prototype._expandRule()`

`/www/examples/...`:
- simplest (added `RiText.prototype.color()` to `rita.js` as noted above)
- grammar-haiku (both canvas and processing versions needed fixing)
- alignments (canvas version making Processing calls; invalid call to
`showBoundingBoxes()`)
- typewriter (processing needed .wav path adjusted, canvas had a few bad
function calls)
- move-to (canvas had `e.getType()` instead of `e.type()`)
- fade-to-text (same as move-to above)
- words-letters-lines (canvas had bad call to `showBoundingBoxes()`)

TODO:
- canvas version of words-letters-lines gets caught in `_getMetrics()` no-cache loop
- canvas version of create-lines does the same; including Processing to use `PFont` causes lack of `RiText.renderer` assignment of context