Skip to content
This repository has been archived by the owner on Jul 13, 2024. It is now read-only.

Commit

Permalink
Merge develop into master
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoespeon committed Aug 8, 2017
2 parents 5b4e449 + a720871 commit af99edf
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 49 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gitgraph.js",
"version": "1.11.3",
"version": "1.11.4",
"main": [
"./build/gitgraph.js",
"./build/gitgraph.css"
Expand Down
19 changes: 10 additions & 9 deletions build/gitgraph.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ==========================================================
* GitGraph v1.11.3
* GitGraph v1.11.4
* https://github.com/nicoespeon/gitgraph.js
* ==========================================================
* Copyright (c) 2017 Nicolas CARLO (@nicoespeon) ٩(^‿^)۶
Expand Down Expand Up @@ -683,7 +683,13 @@
this.template.commit.color ||
this.template.colors[columnIndex];
options.parent = this.parent;
options.parentCommit = options.parentCommit || _getParentCommitFromBranch(this);

// Set parentCommit
// If there is commit in this branch, set parentCommit to last commit of this branch
// otherwise, set parentCommit to this.parentCommit, the start point of this branch
if (!options.parentCommit) {
options.parentCommit = _getLast(this.commits) || this.parentCommit;
}

// Special compact mode
if (this.parent.mode === "compact" &&
Expand Down Expand Up @@ -739,11 +745,6 @@
options.y = this.offsetY - this.parent.commitOffsetY;
}

// Fork case: Parent commit from parent branch
if (options.parentCommit instanceof Commit === false && this.parentBranch instanceof Branch) {
options.parentCommit = this.parentCommit;
}

// First commit
var isFirstBranch = !(options.parentCommit instanceof Commit);
var isPathBeginning = this.path.length === 0;
Expand Down Expand Up @@ -935,8 +936,8 @@

var detailOffsetY = 0;

if(commitOptions.detail) {
if(this.parent.orientation === "vertical") {
if (commitOptions.detail) {
if (this.parent.orientation === "vertical") {
detailOffsetY = -1 * commitOptions.detail.clientHeight;
} else if (this.parent.orientation === "vertical-reverse") {
detailOffsetY = commitOptions.detail.clientHeight;
Expand Down
4 changes: 2 additions & 2 deletions build/gitgraph.min.js

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions docs/Branch.html
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ <h5>This:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line971">line 971</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line972">line 972</a>
</li></ul></dd>


Expand Down Expand Up @@ -757,7 +757,7 @@ <h5>This:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line839">line 839</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line840">line 840</a>
</li></ul></dd>


Expand Down Expand Up @@ -1059,7 +1059,7 @@ <h5>This:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line848">line 848</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line849">line 849</a>
</li></ul></dd>


Expand Down Expand Up @@ -1322,7 +1322,7 @@ <h6>Properties</h6>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line864">line 864</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line865">line 865</a>
</li></ul></dd>


Expand Down Expand Up @@ -1437,7 +1437,7 @@ <h5>This:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line996">line 996</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line997">line 997</a>
</li></ul></dd>


Expand Down Expand Up @@ -1831,7 +1831,7 @@ <h6>Properties</h6>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line815">line 815</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line816">line 816</a>
</li></ul></dd>


Expand Down Expand Up @@ -1886,7 +1886,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.ht
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Tue Jun 13 2017 21:41:57 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Tue Aug 08 2017 22:31:31 GMT+0200 (CEST)
</footer>

<script> prettyPrint(); </script>
Expand Down
8 changes: 4 additions & 4 deletions docs/Commit.html
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,7 @@ <h6>Properties</h6>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1071">line 1071</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1072">line 1072</a>
</li></ul></dd>


Expand Down Expand Up @@ -1490,7 +1490,7 @@ <h5>This:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1231">line 1231</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1232">line 1232</a>
</li></ul></dd>


Expand Down Expand Up @@ -1575,7 +1575,7 @@ <h5>This:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1120">line 1120</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1121">line 1121</a>
</li></ul></dd>


Expand Down Expand Up @@ -1623,7 +1623,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.ht
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Tue Jun 13 2017 21:41:57 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Tue Aug 08 2017 22:31:31 GMT+0200 (CEST)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/GitGraph.html
Original file line number Diff line number Diff line change
Expand Up @@ -2061,7 +2061,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.ht
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Tue Jun 13 2017 21:41:57 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Tue Aug 08 2017 22:31:31 GMT+0200 (CEST)
</footer>

<script> prettyPrint(); </script>
Expand Down
4 changes: 2 additions & 2 deletions docs/Tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ <h6>Properties</h6>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1319">line 1319</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1320">line 1320</a>
</li></ul></dd>


Expand Down Expand Up @@ -374,7 +374,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.ht
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Tue Jun 13 2017 21:41:57 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Tue Aug 08 2017 22:31:31 GMT+0200 (CEST)
</footer>

<script> prettyPrint(); </script>
Expand Down
6 changes: 3 additions & 3 deletions docs/Template.html
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ <h6>Properties</h6>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1394">line 1394</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1395">line 1395</a>
</li></ul></dd>


Expand Down Expand Up @@ -1329,7 +1329,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1482">line 1482</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1483">line 1483</a>
</li></ul></dd>


Expand Down Expand Up @@ -1399,7 +1399,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.ht
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Tue Jun 13 2017 21:41:57 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Tue Aug 08 2017 22:31:31 GMT+0200 (CEST)
</footer>

<script> prettyPrint(); </script>
Expand Down
19 changes: 10 additions & 9 deletions docs/gitgraph.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,13 @@ <h1 class="page-title">Source: gitgraph.js</h1>
this.template.commit.color ||
this.template.colors[columnIndex];
options.parent = this.parent;
options.parentCommit = options.parentCommit || _getParentCommitFromBranch(this);

// Set parentCommit
// If there is commit in this branch, set parentCommit to last commit of this branch
// otherwise, set parentCommit to this.parentCommit, the start point of this branch
if (!options.parentCommit) {
options.parentCommit = _getLast(this.commits) || this.parentCommit;
}

// Special compact mode
if (this.parent.mode === "compact" &amp;&amp;
Expand Down Expand Up @@ -757,11 +763,6 @@ <h1 class="page-title">Source: gitgraph.js</h1>
options.y = this.offsetY - this.parent.commitOffsetY;
}

// Fork case: Parent commit from parent branch
if (options.parentCommit instanceof Commit === false &amp;&amp; this.parentBranch instanceof Branch) {
options.parentCommit = this.parentCommit;
}

// First commit
var isFirstBranch = !(options.parentCommit instanceof Commit);
var isPathBeginning = this.path.length === 0;
Expand Down Expand Up @@ -953,8 +954,8 @@ <h1 class="page-title">Source: gitgraph.js</h1>

var detailOffsetY = 0;

if(commitOptions.detail) {
if(this.parent.orientation === "vertical") {
if (commitOptions.detail) {
if (this.parent.orientation === "vertical") {
detailOffsetY = -1 * commitOptions.detail.clientHeight;
} else if (this.parent.orientation === "vertical-reverse") {
detailOffsetY = commitOptions.detail.clientHeight;
Expand Down Expand Up @@ -1880,7 +1881,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.ht
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Tue Jun 13 2017 21:41:57 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Tue Aug 08 2017 22:31:31 GMT+0200 (CEST)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.ht
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Tue Jun 13 2017 21:41:57 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Tue Aug 08 2017 22:31:31 GMT+0200 (CEST)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.ht
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Tue Jun 13 2017 21:41:57 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Tue Aug 08 2017 22:31:31 GMT+0200 (CEST)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gitgraph.js",
"version": "1.11.3",
"version": "1.11.4",
"author": "Nicolas Carlo <nicolascarlo.espeon@gmail.com>",
"description": "A JavaScript library to draw pretty git graphs in the browser",
"contributors": [
Expand Down
17 changes: 9 additions & 8 deletions src/gitgraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,13 @@
this.template.commit.color ||
this.template.colors[columnIndex];
options.parent = this.parent;
options.parentCommit = options.parentCommit || _getParentCommitFromBranch(this);

// Set parentCommit
// If there is commit in this branch, set parentCommit to last commit of this branch
// otherwise, set parentCommit to this.parentCommit, the start point of this branch
if (!options.parentCommit) {
options.parentCommit = _getLast(this.commits) || this.parentCommit;
}

// Special compact mode
if (this.parent.mode === "compact" &&
Expand Down Expand Up @@ -729,11 +735,6 @@
options.y = this.offsetY - this.parent.commitOffsetY;
}

// Fork case: Parent commit from parent branch
if (options.parentCommit instanceof Commit === false && this.parentBranch instanceof Branch) {
options.parentCommit = this.parentCommit;
}

// First commit
var isFirstBranch = !(options.parentCommit instanceof Commit);
var isPathBeginning = this.path.length === 0;
Expand Down Expand Up @@ -925,8 +926,8 @@

var detailOffsetY = 0;

if(commitOptions.detail) {
if(this.parent.orientation === "vertical") {
if (commitOptions.detail) {
if (this.parent.orientation === "vertical") {
detailOffsetY = -1 * commitOptions.detail.clientHeight;
} else if (this.parent.orientation === "vertical-reverse") {
detailOffsetY = commitOptions.detail.clientHeight;
Expand Down

0 comments on commit af99edf

Please sign in to comment.