module.exports = makeColumn;
-function makeColumn(font, tengwa) {
- return new Column(font, tengwa);
+function makeColumn(font, tengwa, tengwaNote) {
+ return new Column(font, tengwa, tengwaNote);
};
-var Column = function (font, tengwa) {
+var Column = function (font, tengwa, tengwaNote) {
this.font = font;
this.above = void 0;
this.tildeAbove = void 0;
this.below = void 0;
this.following = void 0;
this.error = void 0;
+
+ this.aboveNote = void 0;
+ this.tildeAboveNote = void 0;
+ this.tengwaNote = tengwaNote;
+ this.tildeBelowNote = void 0;
+ this.belowNote = void 0;
+ this.followingNote = void 0;
};
Column.prototype.canAddAbove = function (tehta, reversed) {
);
};
-Column.prototype.addAbove = function (above) {
+Column.prototype.addAbove = function (above, aboveNote) {
if (!this.font.tehtaForTengwa(this.tengwa, above)) {
this.reverse();
}
this.above = above;
+ this.aboveNote = aboveNote;
return this;
};
);
};
-Column.prototype.addBelow = function (below) {
+Column.prototype.addBelow = function (below, belowNote) {
if (!this.font.tehtaForTengwa(this.tengwa, below)) {
this.reverse();
}
this.below = below;
+ this.belowNote = belowNote;
return this;
};
-Column.prototype.addTildeAbove = function () {
+Column.prototype.addTildeAbove = function (tildeAboveNote) {
this.tildeAbove = true;
+ this.tildeAboveNote = tildeAboveNote;
return this;
};
-Column.prototype.addTildeBelow = function () {
+Column.prototype.addTildeBelow = function (tildeBelowNote) {
this.tildeBelow = true;
+ this.tildeBelowNote = tildeBelowNote;
return this;
};
return !this.following && !!this.font.tehtaForTengwa(this.tengwa, following);
};
-Column.prototype.addFollowing = function (following) {
+Column.prototype.addFollowing = function (following, followingNote) {
this.following = following;
+ this.followingNote = followingNote;
return this;
};
Column.prototype.clone = function () {
var column = new Column(this.font, this.tengwa);
- if (this.above) column.addAbove(this.above);
- if (this.below) column.addBelow(this.below);
- if (this.following) column.addFollowing(this.following);
- if (this.tildeBelow) column.addTildeBelow();
- if (this.tildeAbove) column.addTildeAbove();
+ if (this.above) column.addAbove(this.above, this.aboveNote);
+ if (this.below) column.addBelow(this.below, this.belowNote);
+ if (this.following) column.addFollowing(this.following, this.followingNote);
+ if (this.tildeBelow) column.addTildeBelow(this.tildeBelowNote);
+ if (this.tildeAbove) column.addTildeAbove(this.tildeAboveNote);
return column;
};