mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-08-16 15:51:01 +02:00
moving slowly towards other things processing
This commit is contained in:
parent
423a353e28
commit
a180426cfb
6 changed files with 571 additions and 544 deletions
|
@ -4,6 +4,7 @@ var Backbone = require('backbone');
|
|||
|
||||
var GRAPHICS = require('../util/constants').GRAPHICS;
|
||||
var GLOBAL = require('../util/constants').GLOBAL;
|
||||
var Main = require('../app');
|
||||
|
||||
var Collections = require('../models/collections');
|
||||
var CommitCollection = Collections.CommitCollection;
|
||||
|
@ -36,8 +37,7 @@ function GitVisuals(options) {
|
|||
this.branchCollection.on('remove', this.removeBranch, this);
|
||||
this.deferred = [];
|
||||
|
||||
this.events = require('../app').getEvents();
|
||||
this.events.on('refreshTree', this.refreshTree, this);
|
||||
Main.getEvents().on('refreshTree', this.refreshTree, this);
|
||||
}
|
||||
|
||||
GitVisuals.prototype.defer = function(action) {
|
||||
|
@ -618,7 +618,7 @@ GitVisuals.prototype.calcDepthRecursive = function(commit, depth) {
|
|||
GitVisuals.prototype.canvasResize = _.debounce(function(width, height) {
|
||||
// refresh when we are ready
|
||||
if (GLOBAL.isAnimating) {
|
||||
this.events.trigger('commandSubmitted', 'refresh');
|
||||
Main.getEventBaton().trigger('commandSubmitted', 'refresh');
|
||||
} else {
|
||||
this.refreshTree();
|
||||
}
|
||||
|
|
|
@ -319,7 +319,7 @@ var VisBranch = VisBase.extend({
|
|||
|
||||
_.each(objs, function(rObj) {
|
||||
rObj.click(function() {
|
||||
Main.getEvents().trigger('commandSubmitted', commandStr);
|
||||
Main.getEventBaton().trigger('commandSubmitted', commandStr);
|
||||
});
|
||||
$(rObj.node).css('cursor', 'pointer');
|
||||
});
|
||||
|
|
|
@ -318,7 +318,7 @@ var VisNode = VisBase.extend({
|
|||
var Main = require('../app');
|
||||
_.each([this.get('circle'), this.get('text')], function(rObj) {
|
||||
rObj.click(function() {
|
||||
Main.getEvents().trigger('commandSubmitted', commandStr);
|
||||
Main.getEventBaton().trigger('commandSubmitted', commandStr);
|
||||
});
|
||||
$(rObj.node).css('cursor', 'pointer');
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue