never thought i would see the DAYgit pushgit push! rebase animation fully working for all edge cases

This commit is contained in:
Peter Cottle 2012-10-13 01:48:31 -07:00
parent 6e30bedd37
commit be2a5bf35b
4 changed files with 42 additions and 19 deletions

View file

@ -64,11 +64,15 @@ GitVisuals.prototype.toScreenCoords = function(pos) {
};
};
GitVisuals.prototype.animateAllFromAttrToAttr = function(fromSnapshot, toSnapshot) {
GitVisuals.prototype.animateAllFromAttrToAttr = function(fromSnapshot, toSnapshot, idsToOmit) {
var animate = function(obj) {
var id = obj.getID();
if (_.include(idsToOmit, id)) {
return;
}
if (!fromSnapshot[id] || !toSnapshot[id]) {
console.warn('this obj doesnt exist yet', id);
// its actually ok it doesnt exist yet
return;
}
obj.animateFromAttrToAttr(fromSnapshot[id], toSnapshot[id]);