fix(animation): reset vars, not null

This commit is contained in:
Adam Bradley
2015-09-28 11:01:50 -05:00
parent 97b5142174
commit 4b7134df34

View File

@@ -25,13 +25,23 @@ import {extend} from '../util/util';
export class Animation {
constructor(ele, opts={}) {
this._el = [];
this._chld = [];
this._ani = [];
this.reset();
this._opts = extend({
renderDelay: 36
}, opts);
this.elements(ele);
if (!document.documentElement.animate) {
console.error('Web Animations polyfill missing');
}
}
reset() {
this._el = [];
this._chld = [];
this._ani = [];
this._bfAdd = [];
this._bfSty = {};
this._bfRmv = [];
@@ -41,12 +51,6 @@ export class Animation {
this._readys = [];
this._plays = [];
this._finishes = [];
this.elements(ele);
if (!document.documentElement.animate) {
console.error('Web Animations polyfill missing');
}
}
elements(ele) {
@@ -502,7 +506,7 @@ export class Animation {
this._ani[i].dispose();
}
this._el = this._parent = this._chld = this._ani = this._readys = this._plays = this._finishes = null;
this.reset();
}
/*