BOOOOM part of the tree layout done\!

This commit is contained in:
Peter Cottle 2012-09-17 01:05:19 -07:00
parent 9378254f0a
commit d16b8b61d3
3 changed files with 155 additions and 14 deletions

View file

@ -798,14 +798,15 @@ var Branch = Ref.extend({
var Commit = Backbone.Model.extend({
defaults: {
type: 'commit',
children: [],
parents: []
children: null,
parents: null,
},
validateAtInit: function() {
if (!this.get('id')) {
this.set('id', uniqueId('C'));
}
this.set('children', []);
// root commits have no parents
if (!this.get('rootCommit')) {