1
0
Fork 0

fgfs.js: allow lazy loading of animated elements

This commit is contained in:
Torsten Dreyer 2014-10-13 10:39:16 +02:00
parent 67867d8a32
commit 60eed738e1

View file

@ -307,11 +307,15 @@ FGFS.TranslateTransform = function(arg) {
FGFS.Animation = function(arg) {
this.element = arg.element;
this.type = arg.type;
this._element = null;
this.__proto__.update = function(svg) {
var t = typeof (this._element);
if (typeof (this._element) == 'undefined') {
if (null == this._element) {
this._element = $(svg).find(this.element);
if( 0 == this._element.length ) {
this._element = null;
return;
}
}
this._element.fgAnimateSVG(this.makeAnimation());