mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-08-17 16:21:06 +02:00
level arbiter beginning
This commit is contained in:
parent
d5bddcc6b4
commit
27498419c9
10 changed files with 109 additions and 19 deletions
|
@ -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 = {};
|
||||
|
|
|
@ -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')];
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue