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

Commit 3ddefc2

Browse files
committed
Merge develop into master
2 parents d77c131 + 98c75c6 commit 3ddefc2

File tree

15 files changed

+96
-102
lines changed

15 files changed

+96
-102
lines changed

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![gitgraph.js](/assets/logo/gitgraph-logo.png)
1+
![gitgraph.js](/assets/logo/gitgraph-logo.png)
22

33
[![Build Status](https://secure.travis-ci.org/nicoespeon/gitgraph.js.png)](http://travis-ci.org/nicoespeon/gitgraph.js) [![devDependency Status](https://david-dm.org/nicoespeon/gitgraph.js/dev-status.png)](https://david-dm.org/nicoespeon/gitgraph.js#info=devDependencies)
44
===========
@@ -86,12 +86,6 @@ And constructed with the following guidelines:
8686
- New additions without breaking backward compatibility bumps the `<minor>` (and resets the `<patch>`)
8787
- Bug fixes and misc. changes bumps the `<patch>`
8888

89-
### Development version
90-
91-
Please note that until we pass `v1.0.0` we are in **development version**.
92-
93-
That means you're using this code at your own risk until then, but we already love you =)
94-
9589
## Authors and contributors
9690

9791
**Nicolas Carlo** - [@nicoespeon](https://twitter.com/nicoespeon) } <http://nicoespeon.com>

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gitgraph.js",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"main": [ "./build/gitgraph.js", "./build/gitgraph.css" ],
55
"ignore": [
66
"**/.*"

build/gitgraph.js

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* ==========================================================
2-
* GitGraph v1.1.0
2+
* GitGraph v1.1.1
33
* https://github.com/nicoespeon/gitgraph.js
44
* ==========================================================
5-
* Copyright (c) 2015 Nicolas CARLO (@nicoespeon) ٩(^‿^)۶
6-
* Copyright (c) 2015 Fabien BERNARD (@fabien0102) ✌(✰‿✰)✌
5+
* Copyright (c) 2016 Nicolas CARLO (@nicoespeon) ٩(^‿^)۶
6+
* Copyright (c) 2016 Fabien BERNARD (@fabien0102) ✌(✰‿✰)✌
77
*
88
* GitGraph.js may be freely distributed under the MIT Licence
99
* ========================================================== */
@@ -134,7 +134,7 @@
134134

135135
// Navigation vars
136136
this.HEAD = null;
137-
this.branchs = [];
137+
this.branches = [];
138138
this.commits = [];
139139

140140
// Utilities
@@ -183,7 +183,7 @@
183183

184184
// Add branch
185185
var branch = new Branch( options );
186-
this.branchs.push( branch );
186+
this.branches.push( branch );
187187

188188
// Return
189189
return branch;
@@ -212,7 +212,7 @@
212212

213213
// Add branch
214214
var branch = new Branch( options );
215-
this.branchs.push( branch );
215+
this.branches.push( branch );
216216

217217
// Return
218218
return branch;
@@ -311,8 +311,8 @@
311311
this.offsetX = this.canvas.width - this.marginX * 2;
312312
}
313313

314-
// Render branchs
315-
for ( var i = this.branchs.length - 1, branch; !!(branch = this.branchs[ i ]); i-- ) {
314+
// Render branches
315+
for ( var i = this.branches.length - 1, branch; !!(branch = this.branches[ i ]); i-- ) {
316316
branch.render();
317317
}
318318

@@ -414,7 +414,6 @@
414414
}
415415
};
416416

417-
418417
/**
419418
* Click event on commit dot
420419
*
@@ -519,7 +518,7 @@
519518

520519
// Add branch
521520
var branch = new Branch( options );
522-
this.parent.branchs.push( branch );
521+
this.parent.branches.push( branch );
523522

524523
// Return
525524
return branch;
@@ -769,7 +768,7 @@
769768
**/
770769
Branch.prototype.calculColumn = function () {
771770
var candidates = [];
772-
for ( var i = 0, branch; !!(branch = this.parent.branchs[ i ]); i++ ) {
771+
for ( var i = 0, branch; !!(branch = this.parent.branches[ i ]); i++ ) {
773772
if ( !branch.isfinish ) {
774773
if ( !( branch.column in candidates ) ) {
775774
candidates[ branch.column ] = 0;
@@ -897,13 +896,6 @@
897896
this.arrow();
898897
}
899898

900-
// Detail
901-
if ( this.detail !== null ) {
902-
this.detail.style.left = this.parent.canvas.offsetLeft + (this.parent.columnMax + 1) * this.template.branch.spacingX + 30 + "px";
903-
this.detail.style.top = this.parent.canvas.offsetTop + this.y + 40 + "px";
904-
this.detail.width = 30;
905-
}
906-
907899
this.context.font = this.messageFont;
908900

909901
// Tag
@@ -926,6 +918,15 @@
926918
tagWidth = (tagWidth < textWidth) ? textWidth : tagWidth;
927919
}
928920

921+
var commitOffsetLeft = (this.parent.columnMax + 1) * this.template.branch.spacingX + tagWidth;
922+
923+
// Detail
924+
if ( this.detail !== null ) {
925+
this.detail.style.left = this.parent.canvas.offsetLeft + commitOffsetLeft + this.x + 30 + "px";
926+
this.detail.style.top = this.parent.canvas.offsetTop + this.y + 40 + "px";
927+
this.detail.width = 30;
928+
}
929+
929930
// Message
930931
if ( this.messageDisplay ) {
931932
var message = this.message;
@@ -940,7 +941,7 @@
940941
}
941942

942943
this.context.fillStyle = this.messageColor;
943-
this.context.fillText( message, ((this.parent.columnMax + 1) * this.template.branch.spacingX) + tagWidth, this.y + this.dotSize/2);
944+
this.context.fillText( message, commitOffsetLeft, this.y + this.dotSize / 2);
944945
}
945946
};
946947

@@ -1014,8 +1015,8 @@
10141015
* @param {String} [options.branch.color] - Branch color
10151016
* @param {Number} [options.branch.linewidth] - Branch line width
10161017
* @param {String} [options.branch.mergeStyle = ("bezier"|"straight")] - Branch merge style
1017-
* @param {Number} [options.branch.spacingX] - Space between branchs
1018-
* @param {Number} [options.branch.spacingY] - Space between branchs
1018+
* @param {Number} [options.branch.spacingX] - Space between branches
1019+
* @param {Number} [options.branch.spacingY] - Space between branches
10191020
* @param {Number} [options.commit.spacingX] - Space between commits
10201021
* @param {Number} [options.commit.spacingY] - Space between commits
10211022
* @param {Number} [options.commit.widthExtension = 0] - Additional width to be added to the calculated width
@@ -1060,7 +1061,7 @@
10601061
// Merge style = "bezier" | "straight"
10611062
this.branch.mergeStyle = options.branch.mergeStyle || "bezier";
10621063

1063-
// Space between branchs
1064+
// Space between branches
10641065
this.branch.spacingX = (typeof options.branch.spacingX === "number") ? options.branch.spacingX : 20;
10651066
this.branch.spacingY = options.branch.spacingY || 0;
10661067

build/gitgraph.min.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/Branch.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ <h6>Properties</h6>
271271

272272
<dt class="tag-source">Source:</dt>
273273
<dd class="tag-source"><ul class="dummy"><li>
274-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line443">line 443</a>
274+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line442">line 442</a>
275275
</li></ul></dd>
276276

277277

@@ -412,7 +412,7 @@ <h5>Parameters:</h5>
412412

413413
<dt class="tag-source">Source:</dt>
414414
<dd class="tag-source"><ul class="dummy"><li>
415-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line498">line 498</a>
415+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line497">line 497</a>
416416
</li></ul></dd>
417417

418418

@@ -513,7 +513,7 @@ <h5>This:</h5>
513513

514514
<dt class="tag-source">Source:</dt>
515515
<dd class="tag-source"><ul class="dummy"><li>
516-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line760">line 760</a>
516+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line759">line 759</a>
517517
</li></ul></dd>
518518

519519

@@ -585,7 +585,7 @@ <h5>This:</h5>
585585

586586
<dt class="tag-source">Source:</dt>
587587
<dd class="tag-source"><ul class="dummy"><li>
588-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line680">line 680</a>
588+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line679">line 679</a>
589589
</li></ul></dd>
590590

591591

@@ -780,7 +780,7 @@ <h6>Properties</h6>
780780

781781
<dt class="tag-source">Source:</dt>
782782
<dd class="tag-source"><ul class="dummy"><li>
783-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line563">line 563</a>
783+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line562">line 562</a>
784784
</li></ul></dd>
785785

786786

@@ -859,7 +859,7 @@ <h5>This:</h5>
859859

860860
<dt class="tag-source">Source:</dt>
861861
<dd class="tag-source"><ul class="dummy"><li>
862-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line689">line 689</a>
862+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line688">line 688</a>
863863
</li></ul></dd>
864864

865865

@@ -1039,7 +1039,7 @@ <h5>Parameters:</h5>
10391039

10401040
<dt class="tag-source">Source:</dt>
10411041
<dd class="tag-source"><ul class="dummy"><li>
1042-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line703">line 703</a>
1042+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line702">line 702</a>
10431043
</li></ul></dd>
10441044

10451045

@@ -1133,7 +1133,7 @@ <h5>This:</h5>
11331133

11341134
<dt class="tag-source">Source:</dt>
11351135
<dd class="tag-source"><ul class="dummy"><li>
1136-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line523">line 523</a>
1136+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line522">line 522</a>
11371137
</li></ul></dd>
11381138

11391139

@@ -1180,7 +1180,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="Branch.h
11801180
<br clear="both">
11811181

11821182
<footer>
1183-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Tue Nov 24 2015 14:19:03 GMT+0100 (CET)
1183+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Sat Jan 09 2016 11:06:32 GMT+0100 (CET)
11841184
</footer>
11851185

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

docs/Commit.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ <h6>Properties</h6>
10251025

10261026
<dt class="tag-source">Source:</dt>
10271027
<dd class="tag-source"><ul class="dummy"><li>
1028-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line815">line 815</a>
1028+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line814">line 814</a>
10291029
</li></ul></dd>
10301030

10311031

@@ -1115,7 +1115,7 @@ <h5>This:</h5>
11151115

11161116
<dt class="tag-source">Source:</dt>
11171117
<dd class="tag-source"><ul class="dummy"><li>
1118-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line942">line 942</a>
1118+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line943">line 943</a>
11191119
</li></ul></dd>
11201120

11211121

@@ -1187,7 +1187,7 @@ <h5>This:</h5>
11871187

11881188
<dt class="tag-source">Source:</dt>
11891189
<dd class="tag-source"><ul class="dummy"><li>
1190-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line864">line 864</a>
1190+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line863">line 863</a>
11911191
</li></ul></dd>
11921192

11931193

@@ -1234,7 +1234,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="Branch.h
12341234
<br clear="both">
12351235

12361236
<footer>
1237-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Tue Nov 24 2015 14:19:03 GMT+0100 (CET)
1237+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Sat Jan 09 2016 11:06:32 GMT+0100 (CET)
12381238
</footer>
12391239

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

docs/GitGraph.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ <h5>Parameters:</h5>
823823

824824
<dt class="tag-source">Source:</dt>
825825
<dd class="tag-source"><ul class="dummy"><li>
826-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line415">line 415</a>
826+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line414">line 414</a>
827827
</li></ul></dd>
828828

829829

@@ -1498,7 +1498,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="Branch.h
14981498
<br clear="both">
14991499

15001500
<footer>
1501-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Tue Nov 24 2015 14:19:03 GMT+0100 (CET)
1501+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Sat Jan 09 2016 11:06:32 GMT+0100 (CET)
15021502
</footer>
15031503

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

docs/Template.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ <h6>Properties</h6>
421421
</td>
422422

423423

424-
<td class="description last"><p>Space between branchs</p></td>
424+
<td class="description last"><p>Space between branches</p></td>
425425
</tr>
426426

427427

@@ -458,7 +458,7 @@ <h6>Properties</h6>
458458
</td>
459459

460460

461-
<td class="description last"><p>Space between branchs</p></td>
461+
<td class="description last"><p>Space between branches</p></td>
462462
</tr>
463463

464464

@@ -1054,7 +1054,7 @@ <h6>Properties</h6>
10541054

10551055
<dt class="tag-source">Source:</dt>
10561056
<dd class="tag-source"><ul class="dummy"><li>
1057-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1027">line 1027</a>
1057+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1028">line 1028</a>
10581058
</li></ul></dd>
10591059

10601060

@@ -1189,7 +1189,7 @@ <h5>Parameters:</h5>
11891189

11901190
<dt class="tag-source">Source:</dt>
11911191
<dd class="tag-source"><ul class="dummy"><li>
1192-
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1106">line 1106</a>
1192+
<a href="gitgraph.js.html">gitgraph.js</a>, <a href="gitgraph.js.html#line1107">line 1107</a>
11931193
</li></ul></dd>
11941194

11951195

@@ -1258,7 +1258,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="Branch.h
12581258
<br clear="both">
12591259

12601260
<footer>
1261-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Tue Nov 24 2015 14:19:03 GMT+0100 (CET)
1261+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Sat Jan 09 2016 11:06:32 GMT+0100 (CET)
12621262
</footer>
12631263

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

0 commit comments

Comments
 (0)