refresh fromt ree bug and clicik bug

This commit is contained in:
Peter Cottle 2013-01-12 12:54:00 -08:00
parent a83a12b211
commit 4db83ba808
6 changed files with 31 additions and 64 deletions

View file

@ -557,15 +557,6 @@ GitVisuals.prototype.animateNodePositions = function(speed) {
}, this);
};
GitVisuals.prototype.turnOnPaper = function() {
this.gitReady = false;
};
// does making an accessor method make it any less hacky? that is the true question
GitVisuals.prototype.turnOffPaper = function() {
this.gitReady = true;
};
GitVisuals.prototype.addBranchFromEvent = function(branch, collection, index) {
var action = _.bind(function() {
this.addBranch(branch);
@ -588,6 +579,10 @@ GitVisuals.prototype.addBranch = function(branch) {
this.visBranchCollection.add(visBranch);
if (this.gitReady) {
visBranch.genGraphics(this.paper);
} else {
this.defer(_.bind(function() {
visBranch.genGraphics(this.paper);
}, this));
}
};

View file

@ -55,8 +55,7 @@ var VisBranch = VisBase.extend({
this.gitVisuals = this.get('gitVisuals');
this.gitEngine = this.get('gitEngine');
if (!this.gitEngine) {
console.log('throw damnit');
throw new Error('asd');
throw new Error('asd wtf');
}
this.get('branch').set('visBranch', this);
@ -200,7 +199,7 @@ var VisBranch = VisBase.extend({
getTextSize: function() {
var getTextWidth = function(visBranch) {
var textNode = visBranch.get('text').node;
var textNode = (visBranch.get('text')) ? visBranch.get('text').node : null;
return (textNode === null) ? 0 : textNode.clientWidth;
};