level arbiter beginning

This commit is contained in:
Peter Cottle 2013-01-05 21:47:05 -08:00
parent d5bddcc6b4
commit 27498419c9
10 changed files with 109 additions and 19 deletions

View file

@ -16,6 +16,8 @@ var VisEdge = require('../visuals/visEdge').VisEdge;
var VisEdgeCollection = require('../visuals/visEdge').VisEdgeCollection;
function GitVisuals(options) {
options = options || {};
this.options = options;
this.commitCollection = options.commitCollection;
this.branchCollection = options.branchCollection;
this.visNodeMap = {};

View file

@ -313,6 +313,9 @@ var VisBranch = VisBase.extend({
},
attachClickHandlers: function() {
if (this.get('gitVisuals').options.noClick) {
return;
}
var commandStr = 'git checkout ' + this.get('branch').get('id');
var Main = require('../app');
var objs = [this.get('rect'), this.get('text'), this.get('arrow')];

View file

@ -314,6 +314,9 @@ var VisNode = VisBase.extend({
},
attachClickHandlers: function() {
if (this.get('gitVisuals').options.noClick) {
return;
}
var commandStr = 'git checkout ' + this.get('commit').get('id');
var Main = require('../app');
_.each([this.get('circle'), this.get('text')], function(rObj) {

View file

@ -47,7 +47,8 @@ var Visualization = Backbone.View.extend({
this.gitVisuals = new GitVisuals({
commitCollection: this.commitCollection,
branchCollection: this.branchCollection,
paper: this.paper
paper: this.paper,
noClick: this.options.noClick
});
var GitEngine = require('../git').GitEngine;