|
|
|
|
|
|
|
|
var BraceElem = function BraceElem(voice, type) { |
|
|
this.startVoice = voice; |
|
|
this.type = type; |
|
|
}; |
|
|
|
|
|
BraceElem.prototype.setBottomStaff = function (voice) { |
|
|
this.endVoice = voice; |
|
|
|
|
|
if (this.startVoice.header && !this.endVoice.header) { |
|
|
this.header = this.startVoice.header; |
|
|
delete this.startVoice.header; |
|
|
} |
|
|
}; |
|
|
|
|
|
BraceElem.prototype.continuing = function (voice) { |
|
|
|
|
|
this.lastContinuedVoice = voice; |
|
|
}; |
|
|
|
|
|
BraceElem.prototype.getWidth = function () { |
|
|
return 10; |
|
|
}; |
|
|
|
|
|
BraceElem.prototype.isStartVoice = function (voice) { |
|
|
if (this.startVoice && this.startVoice.staff && this.startVoice.staff.voices.length > 0 && this.startVoice.staff.voices[0] === voice) |
|
|
return true; |
|
|
return false; |
|
|
}; |
|
|
|
|
|
module.exports = BraceElem; |
|
|
|