0xfe/vexflow — pull request #199 by Silverwolf90 (2014-04-02 01:00:13+00:00)
Title: Refactor stavenote

Ok so I think I added all the changes you wanted. Some comments are more helpful than others...

Also, to make `NoteHead` inherit from `Note` and function correctly a few changes had to be made.
1. Had to override `.setStave()`
2. Needed to override `.preFormat()`
3. Needed to change `.getAbsoluteX()`

So essentially, `NoteHead` handles two cases now, being used internally in `StaveNote` where it doesn't get formatted. Or being placed directly in a voice, where it does format. Note that `.getAbsoluteX()` won't fail if there is no `TickContext`, but will simply default to the `x` value that was set manually (usually by a `StaveNote`). If it has been preformatted, then it goes with the `tickContext`'s x position.

To draw an individual `NoteHead` you could simply add the following object to a `voice`:
```javascript
var note_head = new Vex.Flow.NoteHead({
duration: "2",
line: 2.5
});
```

`StaveNote.setKeyStyle()` now delegates to `NoteHead`. No more notehead style data is stored in StaveNote.

The code that i removed in `note.js` was leftover stuff from early gracenote stuff that shouldn't have been committed.

**New Tests:**
![image](https://cloud.githubusercontent.com/assets/1631625/2586412/a1dd9cb8-b9ff-11e3-934e-9edd74cf5e04.png)