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 Jun 13, 2017
2 parents 5f9057e + 034818b commit 5b4e449
Show file tree
Hide file tree
Showing 14 changed files with 59 additions and 24 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ issue](https://github.com/nicoespeon/gitgraph.js/issues).

Please have a look at the [Issue Guidelines][] from [Nicolas Gallagher][] before
doing so.

[Issue Guidelines]: https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md
[Nicolas Gallagher]: https://github.com/necolas

Expand All @@ -37,6 +38,7 @@ The JavaScript source code is documented with [JSDoc](http://usejsdoc.org/).

Editor preferences are available in for [the editor config][] easy use in common
text editors. Read more and download plugins at <http://editorconfig.org>.

[the editor config]: https://github.com/nicoespeon/gitgraph.js/blob/master/.editorconfig

The project uses [Grunt](http://gruntjs.com) with convenient methods for our
Expand All @@ -49,6 +51,7 @@ Grunt commands.
From the command line:

- Install [the necessary local dependencies][] with `npm install`.

[the necessary local dependencies]: https://github.com/nicoespeon/gitgraph.js/blob/master/package.json

When completed, you'll be able to run the various Grunt commands provided from
Expand All @@ -61,6 +64,7 @@ the command line.
#### test code - `npm test`

Check source code against [JSHint][] then runs unit tests with [Jasmine][].

[JSHint]: http://www.jshint.com/
[Jasmine]: https://jasmine.github.io/

Expand Down Expand Up @@ -120,6 +124,7 @@ And constructed with the following guidelines:
## Copyright and License

Copyright (c) 2013 Nicolas CARLO and Fabien BERNARD under the [MIT license][]

[MIT license]: https://github.com/nicoespeon/gitgraph.js/blob/master/LICENSE.md

[> What does that mean?](http://choosealicense.com/licenses/mit/)
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.2",
"version": "1.11.3",
"main": [
"./build/gitgraph.js",
"./build/gitgraph.css"
Expand Down
14 changes: 12 additions & 2 deletions build/gitgraph.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ==========================================================
* GitGraph v1.11.2
* GitGraph v1.11.3
* https://github.com/nicoespeon/gitgraph.js
* ==========================================================
* Copyright (c) 2017 Nicolas CARLO (@nicoespeon) ٩(^‿^)۶
Expand Down Expand Up @@ -933,11 +933,21 @@
} else {
targetBranch.commit(commitOptions);

var detailOffsetY = 0;

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

// Add points to path
var targetCommit = _getLast(targetBranch.commits);
var endOfBranch = {
x: this.offsetX + this.template.commit.spacingX * (targetCommit.showLabel ? 3 : 2) - this.parent.commitOffsetX,
y: this.offsetY + this.template.commit.spacingY * (targetCommit.showLabel ? 3 : 2) - this.parent.commitOffsetY,
y: this.offsetY + this.template.commit.spacingY * (targetCommit.showLabel ? 3 : 2) - this.parent.commitOffsetY + detailOffsetY,
type: "joint"
};
this.pushPath(_clone(endOfBranch));
Expand Down
4 changes: 2 additions & 2 deletions build/gitgraph.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 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#line961">line 961</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line971">line 971</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#line986">line 986</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line996">line 996</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 Thu May 25 2017 11:09:19 GMT+0200 (CEST)
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)
</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#line1061">line 1061</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1071">line 1071</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#line1221">line 1221</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1231">line 1231</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#line1110">line 1110</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1120">line 1120</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 Thu May 25 2017 11:09:19 GMT+0200 (CEST)
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)
</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 Thu May 25 2017 11:09:19 GMT+0200 (CEST)
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)
</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#line1309">line 1309</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1319">line 1319</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 Thu May 25 2017 11:09:19 GMT+0200 (CEST)
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)
</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#line1384">line 1384</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1394">line 1394</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#line1472">line 1472</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1482">line 1482</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 Thu May 25 2017 11:09:19 GMT+0200 (CEST)
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)
</footer>

<script> prettyPrint(); </script>
Expand Down
14 changes: 12 additions & 2 deletions docs/gitgraph.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -951,11 +951,21 @@ <h1 class="page-title">Source: gitgraph.js</h1>
} else {
targetBranch.commit(commitOptions);

var detailOffsetY = 0;

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

// Add points to path
var targetCommit = _getLast(targetBranch.commits);
var endOfBranch = {
x: this.offsetX + this.template.commit.spacingX * (targetCommit.showLabel ? 3 : 2) - this.parent.commitOffsetX,
y: this.offsetY + this.template.commit.spacingY * (targetCommit.showLabel ? 3 : 2) - this.parent.commitOffsetY,
y: this.offsetY + this.template.commit.spacingY * (targetCommit.showLabel ? 3 : 2) - this.parent.commitOffsetY + detailOffsetY,
type: "joint"
};
this.pushPath(_clone(endOfBranch));
Expand Down Expand Up @@ -1870,7 +1880,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 Thu May 25 2017 11:09:19 GMT+0200 (CEST)
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)
</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 Thu May 25 2017 11:09:19 GMT+0200 (CEST)
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)
</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 Thu May 25 2017 11:09:19 GMT+0200 (CEST)
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)
</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.2",
"version": "1.11.3",
"author": "Nicolas Carlo <nicolascarlo.espeon@gmail.com>",
"description": "A JavaScript library to draw pretty git graphs in the browser",
"contributors": [
Expand Down
12 changes: 11 additions & 1 deletion src/gitgraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -923,11 +923,21 @@
} else {
targetBranch.commit(commitOptions);

var detailOffsetY = 0;

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

// Add points to path
var targetCommit = _getLast(targetBranch.commits);
var endOfBranch = {
x: this.offsetX + this.template.commit.spacingX * (targetCommit.showLabel ? 3 : 2) - this.parent.commitOffsetX,
y: this.offsetY + this.template.commit.spacingY * (targetCommit.showLabel ? 3 : 2) - this.parent.commitOffsetY,
y: this.offsetY + this.template.commit.spacingY * (targetCommit.showLabel ? 3 : 2) - this.parent.commitOffsetY + detailOffsetY,
type: "joint"
};
this.pushPath(_clone(endOfBranch));
Expand Down

0 comments on commit 5b4e449

Please sign in to comment.