Skip to content

Commit f9a3aa8

Browse files
kjellkvingelunny
authored andcommittedJan 22, 2017
add scroolbars to wide graphs. (#608)
* Add scrollbars to graph and revlist if needed. * Add border
1 parent f8c2903 commit f9a3aa8

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed
 

‎public/css/gitgraph.css

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ body {font:13.34px/1.4 helvetica,arial,freesans,clean,sans-serif;}
22
em {font-style:normal;}
33

44
#git-graph-container, #rel-container {float:left;}
5-
#git-graph-container {}
6-
#git-graph-container li {list-style-type:none;height:20px;line-height:20px;overflow:hidden;}
5+
#rel-container {max-width:30%; overflow-x:auto;}
6+
#git-graph-container {overflow-x:auto; width:100%}
7+
#git-graph-container li {list-style-type:none;height:20px;line-height:20px; white-space:nowrap;}
78
#git-graph-container li .node-relation {font-family:'Bitstream Vera Sans Mono', 'Courier', monospace;}
89
#git-graph-container li .author {color:#666666;}
910
#git-graph-container li .time {color:#999999;font-size:80%}
1011
#git-graph-container li a {color:#000000;}
1112
#git-graph-container li a:hover {text-decoration:underline;}
1213
#git-graph-container li a em {color:#BB0000;border-bottom:1px dotted #BBBBBB;text-decoration:none;font-style:normal;}
13-
#rev-container {width:80%}
14-
#rev-list {margin:0;padding:0 5px 0 0;width:80%}
14+
#rev-container {width:100%}
15+
#rev-list {margin:0;padding:0 5px 0 5px;min-width:95%}
1516
#graph-raw-list {margin:0px;}

‎public/js/draw.js

-4
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,4 @@ $(document).ready(function () {
1010
})
1111

1212
gitGraph(document.getElementById('graph-canvas'), graphList);
13-
14-
if ($("#rev-container")) {
15-
$("#rev-container").css("width", document.body.clientWidth - document.getElementById('graph-canvas').width);
16-
}
1713
})

‎templates/repo/graph.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="ui container">
55

66

7-
<div id="git-graph-container">
7+
<div id="git-graph-container" class="ui segment">
88
<div id="rel-container">
99
<canvas id="graph-canvas">
1010
<ul id="graph-raw-list">

0 commit comments

Comments
 (0)
Please sign in to comment.