mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 00:40:07 +02:00
slick max depth
This commit is contained in:
parent
70e2165aea
commit
1d59152931
3 changed files with 7 additions and 2 deletions
|
@ -426,6 +426,11 @@ var VisNode = Backbone.Model.extend({
|
|||
this.set('outgoingEdges', []);
|
||||
},
|
||||
|
||||
setDepth: function(depth) {
|
||||
// for merge commits we need to max the depths across all
|
||||
this.set('depth', Math.max(this.get('depth') || 0, depth));
|
||||
},
|
||||
|
||||
setDepthBasedOn: function(depthIncrement) {
|
||||
if (this.get('depth') === undefined) {
|
||||
throw new Error('no depth yet!');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue