Skip to content

Commit

Permalink
Committing release binaries for new version: 1.2.80
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfe committed Aug 22, 2016
1 parent 7727e26 commit f5331fc
Show file tree
Hide file tree
Showing 10 changed files with 124 additions and 55 deletions.
50 changes: 37 additions & 13 deletions releases/vexflow-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -7587,11 +7587,21 @@ return /******/ (function(modules) { // webpackBootstrap
var topKeys = topNote.getKeyProps();
var bottomKeys = bottomNote.getKeyProps();

var topY = topNote.getStave().getYForLine(topKeys[0].line);
var bottomY = bottomNote.getStave().getYForLine(bottomKeys[bottomKeys.length - 1].line);
var HALF_NOTEHEAD_HEIGHT = 0.5;

var lineSpace = topNote.getStave().options.spacing_between_lines_px;
if (Math.abs(topY - bottomY) === lineSpace / 2) {
// `keyProps` and `stave.getYForLine` have different notions of a `line`
// so we have to convert the keyProps value by subtracting 5.
// See https://github.com/0xfe/vexflow/wiki/Development-Gotchas
//
// We also extend the y for each note by a half notehead because the
// notehead's origin is centered
var topNotBottomY = topNote.getStave().getYForLine(5 - topKeys[0].line + HALF_NOTEHEAD_HEIGHT);

var bottomNoteTopY = bottomNote.getStave().getYForLine(5 - bottomKeys[bottomKeys.length - 1].line - HALF_NOTEHEAD_HEIGHT);

var areNotesColliding = bottomNoteTopY - topNotBottomY < 0;

if (areNotesColliding) {
xShift = topNote.getVoiceShiftWidth();
bottomNote.setXShift(xShift);
}
Expand Down Expand Up @@ -21881,18 +21891,18 @@ return /******/ (function(modules) { // webpackBootstrap

this.options = defaults;
this.setOptions(options);
if (this.options.renderer.selector !== null || this.options.renderer.context) {
this.initRenderer();
}

this.renderQ = [];
this.systems = [];
this.staves = [];
this.voices = [];
this.stave = null; // current stave
}

_createClass(Factory, [{
key: 'reset',
value: function reset() {
this.renderQ = [];
this.systems = [];
this.staves = [];
this.voices = [];
this.stave = null; // current stave
}
}, {
key: 'getOptions',
value: function getOptions() {
return this.options;
Expand All @@ -21906,6 +21916,11 @@ return /******/ (function(modules) { // webpackBootstrap
var key = _arr[_i];
_extends(this.options[key], options[key]);
}
if (this.options.renderer.selector !== null || this.options.renderer.context) {
this.initRenderer();
}

this.reset();
}
}, {
key: 'initRenderer',
Expand Down Expand Up @@ -22103,6 +22118,15 @@ return /******/ (function(modules) { // webpackBootstrap
this.systems.forEach(function (i) {
return i.setContext(_this.context).draw();
});
this.reset();
}
}], [{
key: 'newFromSelector',
value: function newFromSelector(selector) {
var width = arguments.length <= 1 || arguments[1] === undefined ? 500 : arguments[1];
var height = arguments.length <= 2 || arguments[2] === undefined ? 200 : arguments[2];

return new Factory({ renderer: { selector: selector, width: width, height: height } });
}
}]);

Expand Down
2 changes: 1 addition & 1 deletion releases/vexflow-debug.js.map

Large diffs are not rendered by default.

38 changes: 30 additions & 8 deletions releases/vexflow-legacy-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -7198,11 +7198,21 @@ return /******/ (function(modules) { // webpackBootstrap
var topKeys = topNote.getKeyProps();
var bottomKeys = bottomNote.getKeyProps();

var topY = topNote.getStave().getYForLine(topKeys[0].line);
var bottomY = bottomNote.getStave().getYForLine(bottomKeys[bottomKeys.length - 1].line);
var HALF_NOTEHEAD_HEIGHT = 0.5;

var lineSpace = topNote.getStave().options.spacing_between_lines_px;
if (Math.abs(topY - bottomY) === lineSpace / 2) {
// `keyProps` and `stave.getYForLine` have different notions of a `line`
// so we have to convert the keyProps value by subtracting 5.
// See https://github.com/0xfe/vexflow/wiki/Development-Gotchas
//
// We also extend the y for each note by a half notehead because the
// notehead's origin is centered
var topNotBottomY = topNote.getStave().getYForLine(5 - topKeys[0].line + HALF_NOTEHEAD_HEIGHT);

var bottomNoteTopY = bottomNote.getStave().getYForLine(5 - bottomKeys[bottomKeys.length - 1].line - HALF_NOTEHEAD_HEIGHT);

var areNotesColliding = bottomNoteTopY - topNotBottomY < 0;

if (areNotesColliding) {
xShift = topNote.getVoiceShiftWidth();
bottomNote.setXShift(xShift);
}
Expand Down Expand Up @@ -20621,16 +20631,22 @@ return /******/ (function(modules) { // webpackBootstrap

this.options = defaults;
this.setOptions(options);
if (this.options.renderer.selector !== null || this.options.renderer.context) {
this.initRenderer();
}
}

Factory.newFromSelector = function newFromSelector(selector) {
var width = arguments.length <= 1 || arguments[1] === undefined ? 500 : arguments[1];
var height = arguments.length <= 2 || arguments[2] === undefined ? 200 : arguments[2];

return new Factory({ renderer: { selector: selector, width: width, height: height } });
};

Factory.prototype.reset = function reset() {
this.renderQ = [];
this.systems = [];
this.staves = [];
this.voices = [];
this.stave = null; // current stave
}
};

Factory.prototype.getOptions = function getOptions() {
return this.options;
Expand All @@ -20643,6 +20659,11 @@ return /******/ (function(modules) { // webpackBootstrap
var key = _arr[_i];
_extends(this.options[key], options[key]);
}
if (this.options.renderer.selector !== null || this.options.renderer.context) {
this.initRenderer();
}

this.reset();
};

Factory.prototype.initRenderer = function initRenderer() {
Expand Down Expand Up @@ -20820,6 +20841,7 @@ return /******/ (function(modules) { // webpackBootstrap
this.systems.forEach(function (i) {
return i.setContext(_this.context).draw();
});
this.reset();
};

return Factory;
Expand Down
2 changes: 1 addition & 1 deletion releases/vexflow-legacy-debug.js.map

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions releases/vexflow-legacy-min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion releases/vexflow-legacy-min.js.map

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions releases/vexflow-min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion releases/vexflow-min.js.map

Large diffs are not rendered by default.

47 changes: 35 additions & 12 deletions releases/vexflow-tests.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* VexFlow 1.2.79 built on 2016-08-21.
* VexFlow 1.2.80 built on 2016-08-22.
* Copyright (c) 2010 Mohit Muthanna Cheppudira <[email protected]>
*
* http://www.vexflow.com http://github.com/0xfe/vexflow
Expand Down Expand Up @@ -5097,6 +5097,7 @@ Vex.Flow.Test.Factory = (function() {
var VFT = Vex.Flow.Test;

QUnit.test("Defaults", VFT.Factory.defaults);
VFT.runSVGTest("Draw", VFT.Factory.draw);
},

defaults: function(assert) {
Expand Down Expand Up @@ -5124,6 +5125,13 @@ Vex.Flow.Test.Factory = (function() {
assert.equal(options.stave.space, 10);

assert.expect(5);
},

draw: function(options) {
var vf = VF.Factory.newFromSelector(options.canvas_sel);
vf.Stave().setClef('treble');
vf.draw();
expect(0);
}
};

Expand Down Expand Up @@ -5463,11 +5471,17 @@ VF.Test.Formatter = (function() {

var formatter;
if (options.params.justify > 0) {
formatter = new VF.Formatter().joinVoices( [voice11, voice21, voice31] ).
format([voice11, voice21, voice31], options.params.justify);
formatter = new VF.Formatter()
.joinVoices([voice11])
.joinVoices([voice21])
.joinVoices([voice31])
.format([voice11, voice21, voice31], options.params.justify);
} else {
formatter = new VF.Formatter().joinVoices( [voice11, voice21, voice31] ).
format([voice11, voice21, voice31]);
formatter = new VF.Formatter()
.joinVoices([voice11])
.joinVoices([voice21])
.joinVoices([voice31])
.format([voice11, voice21, voice31]);
}

for (var i = 0; i < options.params.iterations; i++) {
Expand Down Expand Up @@ -5527,11 +5541,17 @@ VF.Test.Formatter = (function() {
voice32.addTickables(notes32);

if (options.params.justify > 0) {
formatter = new VF.Formatter().joinVoices([voice12, voice22, voice32]).
format([voice12, voice22, voice32], 188);
formatter = new VF.Formatter()
.joinVoices([voice12])
.joinVoices([voice22])
.joinVoices([voice32])
.format([voice12, voice22, voice32], 188);
} else {
formatter = new VF.Formatter().joinVoices([voice12, voice22, voice32]).
format([voice12, voice22, voice32]);
formatter = new VF.Formatter()
.joinVoices([voice12])
.joinVoices([voice22])
.joinVoices([voice32])
.format([voice12, voice22, voice32]);
}

for (var i = 0; i < options.params.iterations; i++) {
Expand Down Expand Up @@ -5576,7 +5596,7 @@ VF.Test.Formatter = (function() {
];

voices.map(newVoice).forEach(newStave);
system.addConnector().setType(VF.StaveConnector.type.BRACKET);
system.addConnector().setType(VF.StaveConnector.type.BRACKET);

vf.draw();
ok(true);
Expand All @@ -5591,6 +5611,7 @@ VF.Test.Formatter = (function() {

return Formatter;
})();

/**
* VexFlow - Rest Tests
* Copyright Mohit Muthanna 2010 <[email protected]>
Expand Down Expand Up @@ -7277,8 +7298,10 @@ VF.Test.NoteSubGroup = (function() {
voice3.addTickables(notes3);

var justifyWidth = stave.getNoteEndX() - stave.getNoteStartX() - 10;
var formatter = new VF.Formatter().joinVoices([voice, voice2, voice3]).
format([voice, voice2, voice3], justifyWidth);
var formatter = new VF.Formatter()
.joinVoices([voice, voice2])
.joinVoices([voice3])
.format([voice, voice2, voice3], justifyWidth);

voice.draw(ctx, stave);
voice2.draw(ctx, stave);
Expand Down
2 changes: 1 addition & 1 deletion releases/vexflow-tests.js.map

Large diffs are not rendered by default.

0 comments on commit f5331fc

Please sign in to comment.