Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
renamed $children, updated Interface.js
Browse files Browse the repository at this point in the history
  • Loading branch information
aerhard committed Jul 5, 2014
1 parent eac4b20 commit 02cab23
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions src/Converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -1046,9 +1046,9 @@ var MEI2VF = ( function(m2v, MeiLib, VF, $, undefined) {
* @method processChord
*/
processChord : function(element, staff, staff_n) {
var me = this, i, j, hasDots, $children, keys = [], duration, durations = [], durAtt, xml_id, chord, chord_opts, atts;
var me = this, i, j, hasDots, children, keys = [], duration, durations = [], durAtt, xml_id, chord, chord_opts, atts;

$children = $(element).children();
children = $(element).children();

atts = m2v.Util.attsToObj(element);
durAtt = atts.dur;
Expand All @@ -1061,16 +1061,16 @@ var MEI2VF = ( function(m2v, MeiLib, VF, $, undefined) {
if (durAtt) {
duration = me.translateDuration(+durAtt);
} else {
for ( i = 0, j = $children.length; i < j; i += 1) {
durations.push(+$children[i].getAttribute('dur'));
for ( i = 0, j = children.length; i < j; i += 1) {
durations.push(+children[i].getAttribute('dur'));
}
duration = me.translateDuration(Math.max.apply(Math, durations));
}

for ( i = 0, j = $children.length; i < j; i += 1) {
keys.push(me.processAttsPitch($children[i]));
// dots.push(+$children[i].getAttribute('dots'));
if ($children[i].getAttribute('dots') === '1')
for ( i = 0, j = children.length; i < j; i += 1) {
keys.push(me.processAttsPitch(children[i]));
// dots.push(+children[i].getAttribute('dots'));
if (children[i].getAttribute('dots') === '1')
hasDots = true;
}

Expand All @@ -1089,7 +1089,7 @@ var MEI2VF = ( function(m2v, MeiLib, VF, $, undefined) {

var allNoteIndices = [];

$children.each(function(i) {
children.each(function(i) {
me.processNoteInChord(i, this, element, chord);
allNoteIndices.push(i);
});
Expand Down
2 changes: 1 addition & 1 deletion src/Interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ var MEI2VF = (function(m2v, MeiLib, VF, $, undefined) {
*/
rendered_measures: null,
/**
* Main rendering function.
* Main rendering function.
* @param {XMLDocument} xmlDoc The MEI XML Document
* @param {Element} target An svg or canvas element
* @param {Number} width The width of the print space in pixels. Defaults to 800 (optional)
Expand Down

0 comments on commit 02cab23

Please sign in to comment.