Skip to content

Commit

Permalink
Fix Tuplet Down Stem Bracket Position
Browse files Browse the repository at this point in the history
tuplet.js :: fic positioning of bracket on down stems

tuplet_tests.js :: Modify down stem tests
  • Loading branch information
Larry Kuhns authored and 0xfe committed Jan 28, 2013
1 parent c9febb7 commit 979d84c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/tuplet.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Vex.Flow.Tuplet.prototype.draw = function() {
this.y_pos = first_note.getStave().getYForLine(4) + 20;

for (var i=0; i<this.notes.length; ++i) {
var bottom_y = this.notes[i].getYs()[0] + 20;
var bottom_y = this.notes[i].getStemExtents().topY + 15;
if (bottom_y > this.y_pos)
this.y_pos = bottom_y;
}
Expand Down
18 changes: 9 additions & 9 deletions tests/tuplet_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,15 @@ Vex.Flow.Test.Tuplet.ratio = function(options) {
}

Vex.Flow.Test.Tuplet.bottom = function(options) {
var c = Vex.Flow.Test.Beam.setupContext(options);
var c = Vex.Flow.Test.Beam.setupContext(options, 350, 160);
function newNote(note_struct) { return new Vex.Flow.StaveNote(note_struct); }

var notes = [
newNote({ keys: ["f/5"], stem_direction: -1, duration: "q"}),
newNote({ keys: ["c/5"], stem_direction: -1, duration: "q"}),
newNote({ keys: ["d/5"], stem_direction: -1, duration: "q"}),
newNote({ keys: ["f/4"], stem_direction: -1, duration: "q"}),
newNote({ keys: ["c/4"], stem_direction: -1, duration: "q"}),
newNote({ keys: ["g/4"], stem_direction: -1, duration: "q"}),
newNote({ keys: ["d/5"], stem_direction: -1, duration: "8"}),
newNote({ keys: ["g/5"], stem_direction: -1, duration: "8"}),
newNote({ keys: ["g/3"], stem_direction: -1, duration: "8"}),
newNote({ keys: ["b/4"], stem_direction: -1, duration: "8"})
];

Expand Down Expand Up @@ -190,13 +190,13 @@ Vex.Flow.Test.Tuplet.bottom = function(options) {
}

Vex.Flow.Test.Tuplet.bottom_ratio = function(options) {
var c = Vex.Flow.Test.Beam.setupContext(options);
var c = Vex.Flow.Test.Beam.setupContext(options, 350, 160);
function newNote(note_struct) { return new Vex.Flow.StaveNote(note_struct); }

var notes = [
newNote({ keys: ["f/5"], stem_direction: -1, duration: "q"}),
newNote({ keys: ["c/5"], stem_direction: -1, duration: "q"}),
newNote({ keys: ["d/5"], stem_direction: -1, duration: "q"}),
newNote({ keys: ["f/4"], stem_direction: -1, duration: "q"}),
newNote({ keys: ["c/4"], stem_direction: -1, duration: "q"}),
newNote({ keys: ["d/4"], stem_direction: -1, duration: "q"}),
newNote({ keys: ["d/5"], stem_direction: -1, duration: "8"}),
newNote({ keys: ["g/5"], stem_direction: -1, duration: "8"}),
newNote({ keys: ["b/4"], stem_direction: -1, duration: "8"})
Expand Down

0 comments on commit 979d84c

Please sign in to comment.