debounce ownage

This commit is contained in:
Peter Cottle 2012-12-12 10:46:51 -08:00
parent d2f3c05794
commit 834d410d30
2 changed files with 686 additions and 686 deletions

File diff suppressed because it is too large Load diff

View file

@ -531,14 +531,14 @@ GitVisuals.prototype.calcDepthRecursive = function(commit, depth) {
return maxDepth;
};
GitVisuals.prototype.canvasResize = function(width, height) {
GitVisuals.prototype.canvasResize = _.debounce(function(width, height) {
// refresh when we are ready
if (GLOBAL.isAnimating) {
Main.getEvents().trigger('processCommandFromEvent', 'refresh');
} else {
this.refreshTree();
}
};
}, 200);
GitVisuals.prototype.addCommit = function(commit) {
// TODO