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 Apr 19, 2017
2 parents e753034 + 4d9403c commit 9e3a51a
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 47 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.10.0",
"version": "1.10.1",
"main": [
"./build/gitgraph.js",
"./build/gitgraph.css"
Expand Down
23 changes: 12 additions & 11 deletions build/gitgraph.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ==========================================================
* GitGraph v1.10.0
* GitGraph v1.10.1
* https://github.com/nicoespeon/gitgraph.js
* ==========================================================
* Copyright (c) 2017 Nicolas CARLO (@nicoespeon) ٩(^‿^)۶
Expand Down Expand Up @@ -632,9 +632,9 @@

/**
* Branch commit options
*
*
* @typedef {object} BranchCommitOptions
*
*
* @property {string} [color] - Master color (dot & message)
* @property {string} [author = this.parent.author] - Author name & email
* @property {string} [date] - Date of commit, default is now
Expand Down Expand Up @@ -1194,17 +1194,18 @@
}

// Detail
var DETAIL_OFFSET_LEFT_IN_PX = 60;
var DETAIL_OFFSET_TOP_IN_PX = 30;

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";
this.detail.style.left = this.parent.canvas.offsetLeft + commitOffsetLeft + DETAIL_OFFSET_LEFT_IN_PX + "px";

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

Expand Down Expand Up @@ -1611,7 +1612,7 @@
var dummyText = document.createTextNode("Mg");

dummy.appendChild(dummyText);
dummy.setAttribute("style", "font: " + font + ";");
dummy.setAttribute("style", "font: " + font + "; display: inline-block;");
body.appendChild(dummy);
var fontHeight = dummy.offsetHeight;
body.removeChild(dummy);
Expand Down
4 changes: 2 additions & 2 deletions build/gitgraph.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Branch.html
Original file line number Diff line number Diff line change
Expand Up @@ -1847,7 +1847,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 Mon Apr 03 2017 11:37:53 GMT+0200 (CEST)
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)
</footer>

<script> prettyPrint(); </script>
Expand Down
4 changes: 2 additions & 2 deletions docs/Commit.html
Original file line number Diff line number Diff line change
Expand Up @@ -1451,7 +1451,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#line1225">line 1225</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1226">line 1226</a>
</li></ul></dd>


Expand Down Expand Up @@ -1584,7 +1584,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 Mon Apr 03 2017 11:37:53 GMT+0200 (CEST)
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)
</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 Mon Apr 03 2017 11:37:53 GMT+0200 (CEST)
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)
</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#line1313">line 1313</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1314">line 1314</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 Mon Apr 03 2017 11:37:53 GMT+0200 (CEST)
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)
</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 @@ -1106,7 +1106,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#line1386">line 1386</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1387">line 1387</a>
</li></ul></dd>


Expand Down Expand Up @@ -1255,7 +1255,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#line1473">line 1473</a>
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1474">line 1474</a>
</li></ul></dd>


Expand Down Expand Up @@ -1325,7 +1325,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 Mon Apr 03 2017 11:37:53 GMT+0200 (CEST)
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)
</footer>

<script> prettyPrint(); </script>
Expand Down
23 changes: 12 additions & 11 deletions docs/gitgraph.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -650,9 +650,9 @@ <h1 class="page-title">Source: gitgraph.js</h1>

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

// Detail
var DETAIL_OFFSET_LEFT_IN_PX = 60;
var DETAIL_OFFSET_TOP_IN_PX = 30;

if (this.detail !== null &amp;&amp; _isVertical(this.parent)) {
this.detail.width = 30;
this.detail.style.left = this.parent.canvas.offsetLeft + commitOffsetLeft + this.x + this.detail.width + "px";
this.detail.style.left = this.parent.canvas.offsetLeft + commitOffsetLeft + DETAIL_OFFSET_LEFT_IN_PX + "px";

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

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

dummy.appendChild(dummyText);
dummy.setAttribute("style", "font: " + font + ";");
dummy.setAttribute("style", "font: " + font + "; display: inline-block;");
body.appendChild(dummy);
var fontHeight = dummy.offsetHeight;
body.removeChild(dummy);
Expand Down Expand Up @@ -1871,7 +1872,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 Mon Apr 03 2017 11:37:53 GMT+0200 (CEST)
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)
</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 Mon Apr 03 2017 11:37:53 GMT+0200 (CEST)
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)
</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 Mon Apr 03 2017 11:37:53 GMT+0200 (CEST)
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)
</footer>

<script> prettyPrint(); </script>
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gitgraph.js",
"version": "1.10.0",
"version": "1.10.1",
"author": "Nicolas Carlo <nicolascarlo.espeon@gmail.com>",
"description": "A JavaScript library to draw pretty git graphs in the browser",
"contributors": [
Expand All @@ -10,6 +10,7 @@
}
],
"main": "./src/gitgraph.js",
"types": "./build/gitgraph.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/nicoespeon/gitgraph.js"
Expand Down
21 changes: 11 additions & 10 deletions src/gitgraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -622,9 +622,9 @@

/**
* Branch commit options
*
*
* @typedef {object} BranchCommitOptions
*
*
* @property {string} [color] - Master color (dot & message)
* @property {string} [author = this.parent.author] - Author name & email
* @property {string} [date] - Date of commit, default is now
Expand Down Expand Up @@ -1184,17 +1184,18 @@
}

// Detail
var DETAIL_OFFSET_LEFT_IN_PX = 60;
var DETAIL_OFFSET_TOP_IN_PX = 30;

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";
this.detail.style.left = this.parent.canvas.offsetLeft + commitOffsetLeft + DETAIL_OFFSET_LEFT_IN_PX + "px";

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

Expand Down Expand Up @@ -1601,7 +1602,7 @@
var dummyText = document.createTextNode("Mg");

dummy.appendChild(dummyText);
dummy.setAttribute("style", "font: " + font + ";");
dummy.setAttribute("style", "font: " + font + "; display: inline-block;");
body.appendChild(dummy);
var fontHeight = dummy.offsetHeight;
body.removeChild(dummy);
Expand Down

0 comments on commit 9e3a51a

Please sign in to comment.