BranchGraph now loads async

Centralized keyboard and drag events for BranchGraph
This commit is contained in:
Koen Punt 2012-12-07 19:06:46 +01:00
parent 40576b8709
commit e1282d507f
6 changed files with 123 additions and 95 deletions

View file

@ -4,12 +4,10 @@
%h4
%small You can move around the graph by using the arrow keys.
#holder.graph
.loading
:javascript
var commits = #{@commits_json}
, days = #{@days_json};
var branch_graph = new BranchGraph(days, commits);
var branch_graph;
$(function(){
branch_graph.buildGraph($("#holder")[0]);
GraphNav.init();
branch_graph = new BranchGraph($("#holder"), '#{url_for :controller => 'projects', :action => 'graph'}');
});