branch deleting down

This commit is contained in:
Peter Cottle 2012-10-12 22:59:29 -07:00
parent 1fee32879c
commit f353fa118d
4 changed files with 39 additions and 31 deletions

View file

@ -253,6 +253,18 @@ var VisBranch = Backbone.Model.extend({
return gitVisuals.blendHuesFromBranchStack(this.getBranchStackArray());
},
remove: function() {
var keys = ['text', 'arrow', 'rect'];
_.each(keys, function(key) {
if (this.get(key)) {
this.get(key).remove();
}
}, this);
// also need to remove from gitVisuals
gitVisuals.removeVisBranch(this);
},
genGraphics: function(paper) {
var textPos = this.getTextPosition();