Made the loading indicator a bit more elegant

This commit is contained in:
Lukas Domnick
2013-06-08 23:48:18 +02:00
parent 0af3b18259
commit 00ba0710a3
3 changed files with 40 additions and 26 deletions

View File

@@ -74,8 +74,9 @@
// "private" methods
function findLaneNumberFor( commit ) {
// oh? we've already got a lane?
if( commit.lane ) {
// oh? we've already got a lane?
return commit.lane.number;
}
@@ -325,14 +326,11 @@
commitsGraph = $('div.network-graph').first(),
laneManager = graphLaneManager(),
dataRetriever = commitDataRetriever( commitsGraph.data('source'), handleCommitsRetrieved ),
refreshButton = $('<button class="btn btn-small">Load More</button>').insertAfter(commitsGraph.parent('div')),
paper = Raphael( commitsGraph[0], commitsGraph.width(), commitsGraph.height()),
usedColumns = 0,
detailOverlay = commitDetailOverlay();
dataRetriever.bindIndicator( $('.network-header .meta') );
dataRetriever.bindIndicator( commitsGraph );
dataRetriever.bindIndicator( commitsGraph.parent('.network-view') );
detailOverlay.appendTo( commitsGraph );
@@ -468,6 +466,11 @@
.mouseout( handleCommitMouseout )
.click( handleCommitClick );
// maybe we have not enough space for the lane yet
if( commit.lane.centerY + cfg.laneHeight > paper.height ) {
extendPaper( paper.width, commit.lane.centerY + cfg.laneHeight )
}
$.each( commit.children, function ( idx, thisChild ) {
// if there is one child only, stay on the commit's lane as long as possible when connecting the dots.