canvas worker fix
diff --git a/player/js/animation/AnimationItemWorkerOverride.js b/player/js/animation/AnimationItemWorkerOverride.js index 9604f50..bf8c167 100644 --- a/player/js/animation/AnimationItemWorkerOverride.js +++ b/player/js/animation/AnimationItemWorkerOverride.js
@@ -35,7 +35,10 @@ this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true; this.assetsPath = null; if (params.animationData) { - this.configAnimation(params.animationData); + dataManager.completeAnimation( + params.animationData, + this.configAnimation + ); } else if (params.path) { throw new Error('Canvas worker renderer cannot load animation from url'); } @@ -67,7 +70,7 @@ } } this.animationData.__complete = false; - dataManager.completeData(this.animationData); + dataManager.completeAnimation(this.animationData); this.renderer.includeLayers(data.layers); if (expressionsPlugin) { expressionsPlugin.initExpressions(this); @@ -122,7 +125,6 @@ AnimationItem.prototype.checkLoaded = function () { if (!this.isLoaded) { this.isLoaded = true; - dataManager.completeData(this.animationData); if (expressionsPlugin) { expressionsPlugin.initExpressions(this); }
diff --git a/player/js/module_worker.js b/player/js/module_worker.js index 99a721b..732de22 100644 --- a/player/js/module_worker.js +++ b/player/js/module_worker.js
@@ -56,7 +56,7 @@ lottiejs.mute = animationManager.mute; lottiejs.unmute = animationManager.unmute; lottiejs.getRegisteredAnimations = animationManager.getRegisteredAnimations; - lottie.setIDPrefix = setIDPrefix; + lottiejs.setIDPrefix = setIDPrefix; lottiejs.version = '[[BM_VERSION]]'; return lottiejs;
diff --git a/tasks/build.js b/tasks/build.js index c7bcf00..54e41db 100644 --- a/tasks/build.js +++ b/tasks/build.js
@@ -72,7 +72,7 @@ builds: defaultBuilds }, { - src: 'js/utils/DataManagerWorkerOverrides.js', + src: 'js/utils/DataManager.js', builds: ['canvas_worker'] }, {