[Origin] wow have tree string and undo working flawlessly, somewhat hacky but very robust all things considered

This commit is contained in:
Peter Cottle 2013-05-26 18:21:38 -07:00
parent 2938c3fb37
commit cbcd489a31
10 changed files with 126 additions and 30 deletions

View file

@ -39,7 +39,8 @@ var VisBase = Backbone.Model.extend({
if (instant) {
this.get(key).attr(attr[key]);
} else {
this.get(key).stop().animate(attr[key], speed, easing);
this.get(key).stop();
this.get(key).animate(attr[key], speed, easing);
// some keys dont support animating too, so set those instantly here
_.forEach(this.getNonAnimateKeys(), function(nonAnimateKey) {
if (attr[key] && attr[key][nonAnimateKey] !== undefined) {