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 Jan 9, 2017
2 parents 06ab11e + 3d24483 commit f388dfb
Show file tree
Hide file tree
Showing 14 changed files with 107 additions and 71 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.8.1",
"version": "1.8.2",
"main": ["./build/gitgraph.js", "./build/gitgraph.css"],
"ignore": [
"**/.*"
Expand Down
32 changes: 22 additions & 10 deletions build/gitgraph.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ==========================================================
* GitGraph v1.8.1
* GitGraph v1.8.2
* https://github.com/nicoespeon/gitgraph.js
* ==========================================================
* Copyright (c) 2017 Nicolas CARLO (@nicoespeon) ٩(^‿^)۶
Expand Down Expand Up @@ -692,9 +692,8 @@
options.y = this.offsetY - this.parent.commitOffsetY;

// Detail
var isVertical = this.parent.orientation === "vertical";
var isNotCompact = this.parent.mode !== "compact";
if (typeof options.detailId === "string" && isVertical && isNotCompact) {
var isCompact = (this.parent.mode === "compact");
if (typeof options.detailId === "string" && !isCompact) {
options.detail = document.getElementById(options.detailId);
} else {
options.detail = null;
Expand Down Expand Up @@ -763,10 +762,15 @@
this.parent.commitOffsetX += this.template.commit.spacingX * (options.showLabel ? 2 : 1);
this.parent.commitOffsetY += this.template.commit.spacingY * (options.showLabel ? 2 : 1);

// Add height of detail div (normal vertical mode only)
if (commit.detail !== null) {
// Add height of detail div (vertical mode only)
if (commit.detail !== null && _isVertical(this.parent)) {
commit.detail.style.display = "block";
this.parent.commitOffsetY -= commit.detail.clientHeight - 40;

if (this.parent.orientation === "vertical-reverse") {
this.parent.commitOffsetY += commit.detail.clientHeight;
} else {
this.parent.commitOffsetY -= commit.detail.clientHeight;
}
}

// Auto-render
Expand Down Expand Up @@ -1150,10 +1154,18 @@
}

// Detail
if (this.detail !== null) {
this.detail.style.left = this.parent.canvas.offsetLeft + commitOffsetLeft + this.x + 30 + "px";
this.detail.style.top = this.parent.canvas.offsetTop + this.y + 40 + "px";
if (this.detail !== null && _isVertical(this.parent)) {
this.detail.width = 30;
this.detail.style.left = this.parent.canvas.offsetLeft + commitOffsetLeft + this.x + this.detail.width + "px";

var detailOffsetTop = (this.parent.canvas.offsetTop + this.y);
var detailHorizontalMargin = 30;
if (this.parent.orientation === "vertical-reverse") {
var clientOffset = (this.parent.canvas.clientHeight - this.detail.clientHeight);
this.detail.style.top = detailOffsetTop + clientOffset - detailHorizontalMargin + "px";
} else {
this.detail.style.top = detailOffsetTop + detailHorizontalMargin + "px";
}
}

// Message
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 @@ -593,7 +593,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#line927">line 927</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line931">line 931</a>
</li></ul></dd>


Expand Down Expand Up @@ -665,7 +665,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#line806">line 806</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line810">line 810</a>
</li></ul></dd>


Expand Down Expand Up @@ -939,7 +939,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#line815">line 815</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line819">line 819</a>
</li></ul></dd>


Expand Down Expand Up @@ -1187,7 +1187,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#line830">line 830</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line834">line 834</a>
</li></ul></dd>


Expand Down Expand Up @@ -1282,7 +1282,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#line952">line 952</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line956">line 956</a>
</li></ul></dd>


Expand Down Expand Up @@ -1648,7 +1648,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#line782">line 782</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line786">line 786</a>
</li></ul></dd>


Expand Down Expand Up @@ -1702,7 +1702,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="Branch.h
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 09 2017 23:31:47 GMT+0100 (CET)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Tue Jan 10 2017 00:50:02 GMT+0100 (CET)
</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 @@ -1335,7 +1335,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#line1026">line 1026</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1030">line 1030</a>
</li></ul></dd>


Expand Down Expand Up @@ -1425,7 +1425,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#line1173">line 1173</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1185">line 1185</a>
</li></ul></dd>


Expand Down Expand Up @@ -1497,7 +1497,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#line1074">line 1074</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1078">line 1078</a>
</li></ul></dd>


Expand Down Expand Up @@ -1544,7 +1544,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="Branch.h
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 09 2017 23:31:47 GMT+0100 (CET)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Tue Jan 10 2017 00:50:02 GMT+0100 (CET)
</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 @@ -1845,7 +1845,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="Branch.h
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 09 2017 23:31:47 GMT+0100 (CET)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Tue Jan 10 2017 00:50:02 GMT+0100 (CET)
</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 @@ -281,7 +281,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#line1261">line 1261</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1273">line 1273</a>
</li></ul></dd>


Expand Down Expand Up @@ -360,7 +360,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="Branch.h
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 09 2017 23:31:47 GMT+0100 (CET)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Tue Jan 10 2017 00:50:02 GMT+0100 (CET)
</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 @@ -1093,7 +1093,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#line1335">line 1335</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1347">line 1347</a>
</li></ul></dd>


Expand Down Expand Up @@ -1228,7 +1228,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#line1422">line 1422</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1434">line 1434</a>
</li></ul></dd>


Expand Down Expand Up @@ -1297,7 +1297,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="Branch.h
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 09 2017 23:31:47 GMT+0100 (CET)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Tue Jan 10 2017 00:50:02 GMT+0100 (CET)
</footer>

<script> prettyPrint(); </script>
Expand Down
32 changes: 22 additions & 10 deletions docs/gitgraph.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -709,9 +709,8 @@ <h1 class="page-title">Source: gitgraph.js</h1>
options.y = this.offsetY - this.parent.commitOffsetY;

// Detail
var isVertical = this.parent.orientation === "vertical";
var isNotCompact = this.parent.mode !== "compact";
if (typeof options.detailId === "string" && isVertical && isNotCompact) {
var isCompact = (this.parent.mode === "compact");
if (typeof options.detailId === "string" && !isCompact) {
options.detail = document.getElementById(options.detailId);
} else {
options.detail = null;
Expand Down Expand Up @@ -780,10 +779,15 @@ <h1 class="page-title">Source: gitgraph.js</h1>
this.parent.commitOffsetX += this.template.commit.spacingX * (options.showLabel ? 2 : 1);
this.parent.commitOffsetY += this.template.commit.spacingY * (options.showLabel ? 2 : 1);

// Add height of detail div (normal vertical mode only)
if (commit.detail !== null) {
// Add height of detail div (vertical mode only)
if (commit.detail !== null && _isVertical(this.parent)) {
commit.detail.style.display = "block";
this.parent.commitOffsetY -= commit.detail.clientHeight - 40;

if (this.parent.orientation === "vertical-reverse") {
this.parent.commitOffsetY += commit.detail.clientHeight;
} else {
this.parent.commitOffsetY -= commit.detail.clientHeight;
}
}

// Auto-render
Expand Down Expand Up @@ -1167,10 +1171,18 @@ <h1 class="page-title">Source: gitgraph.js</h1>
}

// Detail
if (this.detail !== null) {
this.detail.style.left = this.parent.canvas.offsetLeft + commitOffsetLeft + this.x + 30 + "px";
this.detail.style.top = this.parent.canvas.offsetTop + this.y + 40 + "px";
if (this.detail !== null && _isVertical(this.parent)) {
this.detail.width = 30;
this.detail.style.left = this.parent.canvas.offsetLeft + commitOffsetLeft + this.x + this.detail.width + "px";

var detailOffsetTop = (this.parent.canvas.offsetTop + this.y);
var detailHorizontalMargin = 30;
if (this.parent.orientation === "vertical-reverse") {
var clientOffset = (this.parent.canvas.clientHeight - this.detail.clientHeight);
this.detail.style.top = detailOffsetTop + clientOffset - detailHorizontalMargin + "px";
} else {
this.detail.style.top = detailOffsetTop + detailHorizontalMargin + "px";
}
}

// Message
Expand Down Expand Up @@ -1819,7 +1831,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="Branch.h
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 09 2017 23:31:47 GMT+0100 (CET)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Tue Jan 10 2017 00:50:01 GMT+0100 (CET)
</footer>

<script> prettyPrint(); </script>
Expand Down
Loading

0 comments on commit f388dfb

Please sign in to comment.