|
1053 | 1053 | * @param {number[]} [options.lineDash = this.template.commit.dot.lineDash]
|
1054 | 1054 | *
|
1055 | 1055 | * @param {string} [options.message = "He doesn't like George Michael! Boooo!"] - Commit message
|
1056 |
| - * @param {string} [options.message] - short commit message (A few chars) to appear on the commit dot |
| 1056 | + * @param {string} [options.commitDotText] - short commit message (A few chars) to appear on the commit dot |
1057 | 1057 | * @param {string} [options.messageColor = options.color] - Specific message color
|
1058 | 1058 | * @param {string} [options.messageFont = this.template.commit.message.font] - Font of the message
|
1059 | 1059 | * @param {boolean} [options.messageDisplay = this.template.commit.message.display] - Commit message display policy
|
|
1086 | 1086 | this.date = options.date || new Date().toUTCString();
|
1087 | 1087 | this.detail = options.detail || null;
|
1088 | 1088 | this.sha1 = options.sha1 || (Math.random(100)).toString(16).substring(3, 10);
|
1089 |
| - this.message = options.message || options.messageShort || "He doesn't like George Michael! Boooo!"; |
1090 |
| - this.messageShort = options.messageShort; |
| 1089 | + this.message = options.message || "He doesn't like George Michael! Boooo!"; |
| 1090 | + this.commitDotText = options.commitDotText; |
1091 | 1091 | this.arrowDisplay = options.arrowDisplay;
|
1092 | 1092 | this.messageDisplay = _booleanOptionOr(options.messageDisplay, this.template.commit.message.display);
|
1093 | 1093 | this.messageAuthorDisplay = _booleanOptionOr(options.messageAuthorDisplay, this.template.commit.message.displayAuthor);
|
|
1207 | 1207 | }
|
1208 | 1208 | }
|
1209 | 1209 |
|
1210 |
| - if (this.messageShort !== undefined) { |
| 1210 | + // Commit Dot Text |
| 1211 | + if (this.commitDotText) { |
1211 | 1212 | var previousTextBaseline = this.context.textBaseline;
|
1212 | 1213 | var previousTextAlign = this.context.textAlign;
|
1213 | 1214 |
|
1214 | 1215 | this.context.fillStyle = "#000";
|
1215 | 1216 | this.context.textAlign = "center";
|
1216 | 1217 | this.context.textBaseline = 'middle';
|
1217 |
| - this.context.fillText(this.messageShort, this.x, this.y); |
| 1218 | + this.context.fillText(this.commitDotText, this.x, this.y); |
1218 | 1219 |
|
1219 | 1220 | this.context.textBaseline = previousTextBaseline;
|
1220 | 1221 | this.context.textAlign = previousTextAlign;
|
|
0 commit comments