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

Commit 5b4e449

Browse files
committed
Merge develop into master
2 parents 5f9057e + 034818b commit 5b4e449

14 files changed

+59
-24
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ issue](https://github.com/nicoespeon/gitgraph.js/issues).
2626

2727
Please have a look at the [Issue Guidelines][] from [Nicolas Gallagher][] before
2828
doing so.
29+
2930
[Issue Guidelines]: https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md
3031
[Nicolas Gallagher]: https://github.com/necolas
3132

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

3839
Editor preferences are available in for [the editor config][] easy use in common
3940
text editors. Read more and download plugins at <http://editorconfig.org>.
41+
4042
[the editor config]: https://github.com/nicoespeon/gitgraph.js/blob/master/.editorconfig
4143

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

5153
- Install [the necessary local dependencies][] with `npm install`.
54+
5255
[the necessary local dependencies]: https://github.com/nicoespeon/gitgraph.js/blob/master/package.json
5356

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

6366
Check source code against [JSHint][] then runs unit tests with [Jasmine][].
67+
6468
[JSHint]: http://www.jshint.com/
6569
[Jasmine]: https://jasmine.github.io/
6670

@@ -120,6 +124,7 @@ And constructed with the following guidelines:
120124
## Copyright and License
121125

122126
Copyright (c) 2013 Nicolas CARLO and Fabien BERNARD under the [MIT license][]
127+
123128
[MIT license]: https://github.com/nicoespeon/gitgraph.js/blob/master/LICENSE.md
124129

125130
[> What does that mean?](http://choosealicense.com/licenses/mit/)

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gitgraph.js",
3-
"version": "1.11.2",
3+
"version": "1.11.3",
44
"main": [
55
"./build/gitgraph.js",
66
"./build/gitgraph.css"

build/gitgraph.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* ==========================================================
2-
* GitGraph v1.11.2
2+
* GitGraph v1.11.3
33
* https://github.com/nicoespeon/gitgraph.js
44
* ==========================================================
55
* Copyright (c) 2017 Nicolas CARLO (@nicoespeon) ٩(^‿^)۶
@@ -933,11 +933,21 @@
933933
} else {
934934
targetBranch.commit(commitOptions);
935935

936+
var detailOffsetY = 0;
937+
938+
if(commitOptions.detail) {
939+
if(this.parent.orientation === "vertical") {
940+
detailOffsetY = -1 * commitOptions.detail.clientHeight;
941+
} else if (this.parent.orientation === "vertical-reverse") {
942+
detailOffsetY = commitOptions.detail.clientHeight;
943+
}
944+
}
945+
936946
// Add points to path
937947
var targetCommit = _getLast(targetBranch.commits);
938948
var endOfBranch = {
939949
x: this.offsetX + this.template.commit.spacingX * (targetCommit.showLabel ? 3 : 2) - this.parent.commitOffsetX,
940-
y: this.offsetY + this.template.commit.spacingY * (targetCommit.showLabel ? 3 : 2) - this.parent.commitOffsetY,
950+
y: this.offsetY + this.template.commit.spacingY * (targetCommit.showLabel ? 3 : 2) - this.parent.commitOffsetY + detailOffsetY,
941951
type: "joint"
942952
};
943953
this.pushPath(_clone(endOfBranch));

build/gitgraph.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/Branch.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ <h5>This:</h5>
672672

673673
<dt class="tag-source">Source:</dt>
674674
<dd class="tag-source"><ul class="dummy"><li>
675-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line961">line 961</a>
675+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line971">line 971</a>
676676
</li></ul></dd>
677677

678678

@@ -1437,7 +1437,7 @@ <h5>This:</h5>
14371437

14381438
<dt class="tag-source">Source:</dt>
14391439
<dd class="tag-source"><ul class="dummy"><li>
1440-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line986">line 986</a>
1440+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line996">line 996</a>
14411441
</li></ul></dd>
14421442

14431443

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

18881888
<footer>
1889-
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)
1889+
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)
18901890
</footer>
18911891

18921892
<script> prettyPrint(); </script>

docs/Commit.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -1387,7 +1387,7 @@ <h6>Properties</h6>
13871387

13881388
<dt class="tag-source">Source:</dt>
13891389
<dd class="tag-source"><ul class="dummy"><li>
1390-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1061">line 1061</a>
1390+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1071">line 1071</a>
13911391
</li></ul></dd>
13921392

13931393

@@ -1490,7 +1490,7 @@ <h5>This:</h5>
14901490

14911491
<dt class="tag-source">Source:</dt>
14921492
<dd class="tag-source"><ul class="dummy"><li>
1493-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1221">line 1221</a>
1493+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1231">line 1231</a>
14941494
</li></ul></dd>
14951495

14961496

@@ -1575,7 +1575,7 @@ <h5>This:</h5>
15751575

15761576
<dt class="tag-source">Source:</dt>
15771577
<dd class="tag-source"><ul class="dummy"><li>
1578-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1110">line 1110</a>
1578+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1120">line 1120</a>
15791579
</li></ul></dd>
15801580

15811581

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

16251625
<footer>
1626-
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)
1626+
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)
16271627
</footer>
16281628

16291629
<script> prettyPrint(); </script>

docs/GitGraph.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2061,7 +2061,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.ht
20612061
<br class="clear">
20622062

20632063
<footer>
2064-
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)
2064+
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)
20652065
</footer>
20662066

20672067
<script> prettyPrint(); </script>

docs/Tag.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ <h6>Properties</h6>
294294

295295
<dt class="tag-source">Source:</dt>
296296
<dd class="tag-source"><ul class="dummy"><li>
297-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1309">line 1309</a>
297+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1319">line 1319</a>
298298
</li></ul></dd>
299299

300300

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

376376
<footer>
377-
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)
377+
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)
378378
</footer>
379379

380380
<script> prettyPrint(); </script>

docs/Template.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ <h6>Properties</h6>
11801180

11811181
<dt class="tag-source">Source:</dt>
11821182
<dd class="tag-source"><ul class="dummy"><li>
1183-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1384">line 1384</a>
1183+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1394">line 1394</a>
11841184
</li></ul></dd>
11851185

11861186

@@ -1329,7 +1329,7 @@ <h5>Parameters:</h5>
13291329

13301330
<dt class="tag-source">Source:</dt>
13311331
<dd class="tag-source"><ul class="dummy"><li>
1332-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1472">line 1472</a>
1332+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1482">line 1482</a>
13331333
</li></ul></dd>
13341334

13351335

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

14011401
<footer>
1402-
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)
1402+
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)
14031403
</footer>
14041404

14051405
<script> prettyPrint(); </script>

docs/gitgraph.js.html

+12-2
Original file line numberDiff line numberDiff line change
@@ -951,11 +951,21 @@ <h1 class="page-title">Source: gitgraph.js</h1>
951951
} else {
952952
targetBranch.commit(commitOptions);
953953

954+
var detailOffsetY = 0;
955+
956+
if(commitOptions.detail) {
957+
if(this.parent.orientation === "vertical") {
958+
detailOffsetY = -1 * commitOptions.detail.clientHeight;
959+
} else if (this.parent.orientation === "vertical-reverse") {
960+
detailOffsetY = commitOptions.detail.clientHeight;
961+
}
962+
}
963+
954964
// Add points to path
955965
var targetCommit = _getLast(targetBranch.commits);
956966
var endOfBranch = {
957967
x: this.offsetX + this.template.commit.spacingX * (targetCommit.showLabel ? 3 : 2) - this.parent.commitOffsetX,
958-
y: this.offsetY + this.template.commit.spacingY * (targetCommit.showLabel ? 3 : 2) - this.parent.commitOffsetY,
968+
y: this.offsetY + this.template.commit.spacingY * (targetCommit.showLabel ? 3 : 2) - this.parent.commitOffsetY + detailOffsetY,
959969
type: "joint"
960970
};
961971
this.pushPath(_clone(endOfBranch));
@@ -1870,7 +1880,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.ht
18701880
<br class="clear">
18711881

18721882
<footer>
1873-
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)
1883+
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)
18741884
</footer>
18751885

18761886
<script> prettyPrint(); </script>

docs/global.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1514,7 +1514,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.ht
15141514
<br class="clear">
15151515

15161516
<footer>
1517-
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)
1517+
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)
15181518
</footer>
15191519

15201520
<script> prettyPrint(); </script>

docs/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.ht
115115
<br class="clear">
116116

117117
<footer>
118-
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)
118+
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)
119119
</footer>
120120

121121
<script> prettyPrint(); </script>

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gitgraph.js",
3-
"version": "1.11.2",
3+
"version": "1.11.3",
44
"author": "Nicolas Carlo <[email protected]>",
55
"description": "A JavaScript library to draw pretty git graphs in the browser",
66
"contributors": [

src/gitgraph.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -923,11 +923,21 @@
923923
} else {
924924
targetBranch.commit(commitOptions);
925925

926+
var detailOffsetY = 0;
927+
928+
if(commitOptions.detail) {
929+
if(this.parent.orientation === "vertical") {
930+
detailOffsetY = -1 * commitOptions.detail.clientHeight;
931+
} else if (this.parent.orientation === "vertical-reverse") {
932+
detailOffsetY = commitOptions.detail.clientHeight;
933+
}
934+
}
935+
926936
// Add points to path
927937
var targetCommit = _getLast(targetBranch.commits);
928938
var endOfBranch = {
929939
x: this.offsetX + this.template.commit.spacingX * (targetCommit.showLabel ? 3 : 2) - this.parent.commitOffsetX,
930-
y: this.offsetY + this.template.commit.spacingY * (targetCommit.showLabel ? 3 : 2) - this.parent.commitOffsetY,
940+
y: this.offsetY + this.template.commit.spacingY * (targetCommit.showLabel ? 3 : 2) - this.parent.commitOffsetY + detailOffsetY,
931941
type: "joint"
932942
};
933943
this.pushPath(_clone(endOfBranch));

0 commit comments

Comments
 (0)