mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 08:28:50 +02:00
more glue stuff
This commit is contained in:
parent
ca3c0f2b3f
commit
e412be9b61
2 changed files with 42 additions and 37 deletions
26
src/main.js
26
src/main.js
|
@ -13,6 +13,20 @@ var animationFactory = null;
|
|||
var paper = null;
|
||||
|
||||
$(document).ready(function(){
|
||||
initUI();
|
||||
var mainVis = new Visualization({
|
||||
el: $('#canvasWrapper')[0]
|
||||
});
|
||||
|
||||
// make the canvas for us
|
||||
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");
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
|
||||
function initUI() {
|
||||
// static classes
|
||||
animationFactory = new AnimationFactory();
|
||||
commandCollection = new CommandCollection();
|
||||
|
@ -21,7 +35,6 @@ $(document).ready(function(){
|
|||
collection: commandCollection
|
||||
});
|
||||
|
||||
// TODO make not global
|
||||
commandPromptView = new CommandPromptView({
|
||||
el: $('#commandLineBar'),
|
||||
collection: commandCollection
|
||||
|
@ -32,16 +45,7 @@ $(document).ready(function(){
|
|||
});
|
||||
|
||||
$('#commandTextField').focus();
|
||||
|
||||
var mainVis = new Visualization();
|
||||
|
||||
// make the canvas for us
|
||||
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");
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function windowResize() {
|
||||
var smaller = 10;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue