now have visualization function

This commit is contained in:
Peter Cottle 2012-11-03 13:49:45 -07:00
parent e8ac126f8f
commit ca3c0f2b3f
2 changed files with 37 additions and 29 deletions

View file

@ -21,7 +21,7 @@ $(document).ready(function(){
collection: commandCollection
});
// TODO make not global
// TODO make not global
commandPromptView = new CommandPromptView({
el: $('#commandLineBar'),
collection: commandCollection
@ -31,35 +31,11 @@ $(document).ready(function(){
collection: commandCollection
});
$('#commandTextField').focus();
var mainVis = new Visualization();
// make the canvas for us
Raphael(10, 10, 200, 200, function() {
paper = this;
// the two major collections that affect everything
var commitCollection = new CommitCollection();
var branchCollection = new BranchCollection();
gitVisuals = new GitVisuals({
commitCollection: commitCollection,
branchCollection: branchCollection
});
gitEngine = new GitEngine({
collection: commitCollection,
branches: branchCollection
});
$('#commandTextField').focus();
// needs to be called before raphael ready
windowResize();
events.trigger('raphaelReady');
});
$(window).resize(windowResize);
windowResize();
setTimeout(windowResize, 50);
if (/\?demo/.test(window.location.href)) {
setTimeout(function() {
events.trigger('submitCommandValueFromEvent', "gc; git checkout HEAD~1; git commit; git checkout -b bugFix; gc; gc; git rebase master; git checkout master; gc; gc; git merge bugFix");