|
1 | 1 | /* ==========================================================
|
2 |
| - * GitGraph v1.13.0 |
| 2 | + * GitGraph v1.14.0 |
3 | 3 | * https://github.com/nicoespeon/gitgraph.js
|
4 | 4 | * ==========================================================
|
5 | 5 | * Copyright (c) 2018 Nicolas CARLO (@nicoespeon) ٩(^‿^)۶
|
|
626 | 626 | * @property {string} [color] - Master color (dot & message)
|
627 | 627 | * @property {string} [author = this.parent.author] - Author name & email
|
628 | 628 | * @property {string} [date] - Date of commit, default is now
|
629 |
| - * @property {string} [detail] - DOM Element of detail part |
| 629 | + * @property {HTMLElement} [detail] - DOM Element of detail part |
630 | 630 | * @property {string} [sha1] - Sha1, default is a random short sha1
|
631 | 631 | * @property {Commit} [parentCommit] - Parent commit
|
632 | 632 | * @property {string} [type = ("mergeCommit"|null)] - Type of commit
|
|
727 | 727 |
|
728 | 728 | // Detail
|
729 | 729 | var isCompact = (this.parent.mode === "compact");
|
730 |
| - if (typeof options.detailId === "string" && !isCompact) { |
731 |
| - options.detail = document.getElementById(options.detailId); |
732 |
| - } else { |
| 730 | + if (isCompact) { |
733 | 731 | options.detail = null;
|
| 732 | + } else if (typeof options.detailId === "string") { |
| 733 | + options.detail = document.getElementById(options.detailId) || options.detail; |
734 | 734 | }
|
735 | 735 |
|
736 | 736 | // Check collision (Cause of special compact mode)
|
|
1047 | 1047 | * @param {boolean} options.arrowDisplay - Add a arrow under commit dot
|
1048 | 1048 | * @param {string} [options.author = this.parent.author] - Author name & email
|
1049 | 1049 | * @param {string} [options.date] - Date of commit, default is now
|
1050 |
| - * @param {string} [options.detail] - DOM Element of detail part |
| 1050 | + * @param {HTMLElement} [options.detail] - DOM Element of detail part |
1051 | 1051 | * @param {string} [options.sha1] - Sha1, default is a random short sha1
|
1052 | 1052 | * @param {Commit} [options.parentCommit] - Parent commit
|
1053 | 1053 | * @param {string} [options.type = ("mergeCommit"|null)] - Type of commit
|
|
0 commit comments