OMG I AM RIGHT FUCKING HERE SO CLOSE

This commit is contained in:
Peter Cottle 2013-01-03 13:04:21 -08:00
parent 2e92e106d4
commit d400158781
10 changed files with 183 additions and 76 deletions

View file

@ -61,8 +61,11 @@ var AnimationQueue = Backbone.Model.extend({
},
next: function() {
// ok so call the first animation, and then set a timeout to call the next
// TODO: animations with callbacks!!
// ok so call the first animation, and then set a timeout to call the next.
// since an animation is defined as taking a specific amount of time,
// we can simply just use timeouts rather than promises / deferreds.
// for graphical displays that require an unknown amount of time, use deferreds
// but not animation queue (see the finishAnimation for that)
var animations = this.get('animations');
var index = this.get('index');
if (index >= animations.length) {

View file

@ -217,7 +217,7 @@ var VisNode = VisBase.extend({
setBirthFromSnapshot: function(beforeSnapshot) {
// first get parent attribute
// woof bad data access. TODO
// woof this is pretty bad data access...
var parentID = this.get('commit').get('parents')[0].get('visNode').getID();
var parentAttr = beforeSnapshot[parentID];

View file

@ -11,6 +11,8 @@ var GitVisuals = require('../visuals').GitVisuals;
var Visualization = Backbone.View.extend({
initialize: function(options) {
var _this = this;
this.customEvents = _.clone(Backbone.Events);
new Raphael(10, 10, 200, 200, function() {
// for some reason raphael calls this function with a predefined
@ -58,6 +60,8 @@ var Visualization = Backbone.View.extend({
this.setTreeOpacity(0);
this.fadeTreeIn();
this.customEvents.trigger('gitEngineReady');
},
setTreeOpacity: function(level) {