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

Commit 9e3a51a

Browse files
committed
Merge develop into master
2 parents e753034 + 4d9403c commit 9e3a51a

13 files changed

+51
-47
lines changed

bower.json

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

build/gitgraph.js

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* ==========================================================
2-
* GitGraph v1.10.0
2+
* GitGraph v1.10.1
33
* https://github.com/nicoespeon/gitgraph.js
44
* ==========================================================
55
* Copyright (c) 2017 Nicolas CARLO (@nicoespeon) ٩(^‿^)۶
@@ -632,9 +632,9 @@
632632

633633
/**
634634
* Branch commit options
635-
*
635+
*
636636
* @typedef {object} BranchCommitOptions
637-
*
637+
*
638638
* @property {string} [color] - Master color (dot & message)
639639
* @property {string} [author = this.parent.author] - Author name & email
640640
* @property {string} [date] - Date of commit, default is now
@@ -1194,17 +1194,18 @@
11941194
}
11951195

11961196
// Detail
1197+
var DETAIL_OFFSET_LEFT_IN_PX = 60;
1198+
var DETAIL_OFFSET_TOP_IN_PX = 30;
1199+
11971200
if (this.detail !== null && _isVertical(this.parent)) {
1198-
this.detail.width = 30;
1199-
this.detail.style.left = this.parent.canvas.offsetLeft + commitOffsetLeft + this.x + this.detail.width + "px";
1201+
this.detail.style.left = this.parent.canvas.offsetLeft + commitOffsetLeft + DETAIL_OFFSET_LEFT_IN_PX + "px";
12001202

1201-
var detailOffsetTop = (this.parent.canvas.offsetTop + this.y);
1202-
var detailHorizontalMargin = 30;
1203+
var detailPositionTop = (this.parent.canvas.offsetTop + this.y);
12031204
if (this.parent.orientation === "vertical-reverse") {
1204-
var clientOffset = (this.parent.canvas.clientHeight - this.detail.clientHeight);
1205-
this.detail.style.top = detailOffsetTop + clientOffset - detailHorizontalMargin + "px";
1205+
var clientHeight = (this.parent.canvas.clientHeight - this.detail.clientHeight);
1206+
this.detail.style.top = detailPositionTop + clientHeight - DETAIL_OFFSET_TOP_IN_PX + "px";
12061207
} else {
1207-
this.detail.style.top = detailOffsetTop + detailHorizontalMargin + "px";
1208+
this.detail.style.top = detailPositionTop + DETAIL_OFFSET_TOP_IN_PX + "px";
12081209
}
12091210
}
12101211

@@ -1611,7 +1612,7 @@
16111612
var dummyText = document.createTextNode("Mg");
16121613

16131614
dummy.appendChild(dummyText);
1614-
dummy.setAttribute("style", "font: " + font + ";");
1615+
dummy.setAttribute("style", "font: " + font + "; display: inline-block;");
16151616
body.appendChild(dummy);
16161617
var fontHeight = dummy.offsetHeight;
16171618
body.removeChild(dummy);

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

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

18491849
<footer>
1850-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Mon Apr 03 2017 11:37:53 GMT+0200 (CEST)
1850+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Wed Apr 19 2017 08:51:54 GMT+0200 (CEST)
18511851
</footer>
18521852

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

docs/Commit.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1451,7 +1451,7 @@ <h5>This:</h5>
14511451

14521452
<dt class="tag-source">Source:</dt>
14531453
<dd class="tag-source"><ul class="dummy"><li>
1454-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1225">line 1225</a>
1454+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1226">line 1226</a>
14551455
</li></ul></dd>
14561456

14571457

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

15861586
<footer>
1587-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Mon Apr 03 2017 11:37:53 GMT+0200 (CEST)
1587+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Wed Apr 19 2017 08:51:54 GMT+0200 (CEST)
15881588
</footer>
15891589

15901590
<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 Mon Apr 03 2017 11:37:53 GMT+0200 (CEST)
2064+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Wed Apr 19 2017 08:51:54 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#line1313">line 1313</a>
297+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1314">line 1314</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 Mon Apr 03 2017 11:37:53 GMT+0200 (CEST)
377+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Wed Apr 19 2017 08:51:54 GMT+0200 (CEST)
378378
</footer>
379379

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

docs/Template.html

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

11071107
<dt class="tag-source">Source:</dt>
11081108
<dd class="tag-source"><ul class="dummy"><li>
1109-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1386">line 1386</a>
1109+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1387">line 1387</a>
11101110
</li></ul></dd>
11111111

11121112

@@ -1255,7 +1255,7 @@ <h5>Parameters:</h5>
12551255

12561256
<dt class="tag-source">Source:</dt>
12571257
<dd class="tag-source"><ul class="dummy"><li>
1258-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1473">line 1473</a>
1258+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1474">line 1474</a>
12591259
</li></ul></dd>
12601260

12611261

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

13271327
<footer>
1328-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Mon Apr 03 2017 11:37:53 GMT+0200 (CEST)
1328+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Wed Apr 19 2017 08:51:54 GMT+0200 (CEST)
13291329
</footer>
13301330

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

docs/gitgraph.js.html

+12-11
Original file line numberDiff line numberDiff line change
@@ -650,9 +650,9 @@ <h1 class="page-title">Source: gitgraph.js</h1>
650650

651651
/**
652652
* Branch commit options
653-
*
653+
*
654654
* @typedef {object} BranchCommitOptions
655-
*
655+
*
656656
* @property {string} [color] - Master color (dot &amp; message)
657657
* @property {string} [author = this.parent.author] - Author name &amp; email
658658
* @property {string} [date] - Date of commit, default is now
@@ -1212,17 +1212,18 @@ <h1 class="page-title">Source: gitgraph.js</h1>
12121212
}
12131213

12141214
// Detail
1215+
var DETAIL_OFFSET_LEFT_IN_PX = 60;
1216+
var DETAIL_OFFSET_TOP_IN_PX = 30;
1217+
12151218
if (this.detail !== null &amp;&amp; _isVertical(this.parent)) {
1216-
this.detail.width = 30;
1217-
this.detail.style.left = this.parent.canvas.offsetLeft + commitOffsetLeft + this.x + this.detail.width + "px";
1219+
this.detail.style.left = this.parent.canvas.offsetLeft + commitOffsetLeft + DETAIL_OFFSET_LEFT_IN_PX + "px";
12181220

1219-
var detailOffsetTop = (this.parent.canvas.offsetTop + this.y);
1220-
var detailHorizontalMargin = 30;
1221+
var detailPositionTop = (this.parent.canvas.offsetTop + this.y);
12211222
if (this.parent.orientation === "vertical-reverse") {
1222-
var clientOffset = (this.parent.canvas.clientHeight - this.detail.clientHeight);
1223-
this.detail.style.top = detailOffsetTop + clientOffset - detailHorizontalMargin + "px";
1223+
var clientHeight = (this.parent.canvas.clientHeight - this.detail.clientHeight);
1224+
this.detail.style.top = detailPositionTop + clientHeight - DETAIL_OFFSET_TOP_IN_PX + "px";
12241225
} else {
1225-
this.detail.style.top = detailOffsetTop + detailHorizontalMargin + "px";
1226+
this.detail.style.top = detailPositionTop + DETAIL_OFFSET_TOP_IN_PX + "px";
12261227
}
12271228
}
12281229

@@ -1629,7 +1630,7 @@ <h1 class="page-title">Source: gitgraph.js</h1>
16291630
var dummyText = document.createTextNode("Mg");
16301631

16311632
dummy.appendChild(dummyText);
1632-
dummy.setAttribute("style", "font: " + font + ";");
1633+
dummy.setAttribute("style", "font: " + font + "; display: inline-block;");
16331634
body.appendChild(dummy);
16341635
var fontHeight = dummy.offsetHeight;
16351636
body.removeChild(dummy);
@@ -1871,7 +1872,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Branch.ht
18711872
<br class="clear">
18721873

18731874
<footer>
1874-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Mon Apr 03 2017 11:37:53 GMT+0200 (CEST)
1875+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Wed Apr 19 2017 08:51:54 GMT+0200 (CEST)
18751876
</footer>
18761877

18771878
<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 Mon Apr 03 2017 11:37:53 GMT+0200 (CEST)
1517+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Wed Apr 19 2017 08:51:54 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 Mon Apr 03 2017 11:37:53 GMT+0200 (CEST)
118+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Wed Apr 19 2017 08:51:54 GMT+0200 (CEST)
119119
</footer>
120120

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

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gitgraph.js",
3-
"version": "1.10.0",
3+
"version": "1.10.1",
44
"author": "Nicolas Carlo <nicolascarlo.espeon@gmail.com>",
55
"description": "A JavaScript library to draw pretty git graphs in the browser",
66
"contributors": [
@@ -10,6 +10,7 @@
1010
}
1111
],
1212
"main": "./src/gitgraph.js",
13+
"types": "./build/gitgraph.d.ts",
1314
"repository": {
1415
"type": "git",
1516
"url": "https://github.com/nicoespeon/gitgraph.js"

src/gitgraph.js

+11-10
Original file line numberDiff line numberDiff line change
@@ -622,9 +622,9 @@
622622

623623
/**
624624
* Branch commit options
625-
*
625+
*
626626
* @typedef {object} BranchCommitOptions
627-
*
627+
*
628628
* @property {string} [color] - Master color (dot & message)
629629
* @property {string} [author = this.parent.author] - Author name & email
630630
* @property {string} [date] - Date of commit, default is now
@@ -1184,17 +1184,18 @@
11841184
}
11851185

11861186
// Detail
1187+
var DETAIL_OFFSET_LEFT_IN_PX = 60;
1188+
var DETAIL_OFFSET_TOP_IN_PX = 30;
1189+
11871190
if (this.detail !== null && _isVertical(this.parent)) {
1188-
this.detail.width = 30;
1189-
this.detail.style.left = this.parent.canvas.offsetLeft + commitOffsetLeft + this.x + this.detail.width + "px";
1191+
this.detail.style.left = this.parent.canvas.offsetLeft + commitOffsetLeft + DETAIL_OFFSET_LEFT_IN_PX + "px";
11901192

1191-
var detailOffsetTop = (this.parent.canvas.offsetTop + this.y);
1192-
var detailHorizontalMargin = 30;
1193+
var detailPositionTop = (this.parent.canvas.offsetTop + this.y);
11931194
if (this.parent.orientation === "vertical-reverse") {
1194-
var clientOffset = (this.parent.canvas.clientHeight - this.detail.clientHeight);
1195-
this.detail.style.top = detailOffsetTop + clientOffset - detailHorizontalMargin + "px";
1195+
var clientHeight = (this.parent.canvas.clientHeight - this.detail.clientHeight);
1196+
this.detail.style.top = detailPositionTop + clientHeight - DETAIL_OFFSET_TOP_IN_PX + "px";
11961197
} else {
1197-
this.detail.style.top = detailOffsetTop + detailHorizontalMargin + "px";
1198+
this.detail.style.top = detailPositionTop + DETAIL_OFFSET_TOP_IN_PX + "px";
11981199
}
11991200
}
12001201

@@ -1601,7 +1602,7 @@
16011602
var dummyText = document.createTextNode("Mg");
16021603

16031604
dummy.appendChild(dummyText);
1604-
dummy.setAttribute("style", "font: " + font + ";");
1605+
dummy.setAttribute("style", "font: " + font + "; display: inline-block;");
16051606
body.appendChild(dummy);
16061607
var fontHeight = dummy.offsetHeight;
16071608
body.removeChild(dummy);

0 commit comments

Comments
 (0)