diff --git a/package.json b/package.json index 30c3a5a21..247364015 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "type": "git", "url": "https://github.com/airbnb/lottie-web.git" }, + "sideEffects": false, "scripts": { "build": "npx eslint ./player/js/**/* && rollup -c && node tasks/build_worker", "build_test": "node tasks/build.js", diff --git a/player/js/worker_wrapper.js b/player/js/worker_wrapper.js index af701319f..76798a2de 100644 --- a/player/js/worker_wrapper.js +++ b/player/js/worker_wrapper.js @@ -530,6 +530,10 @@ function workerContent() { if (animations[payload.id]) { animations[payload.id].animation.playSegments(payload.arr, payload.forceFlag); } + } else if (type === 'resetSegments') { + if (animations[payload.id]) { + animations[payload.id].animation.resetSegments(payload.forceFlag); + } } else if (type === 'updateDocumentData') { animations[payload.id].animation.updateDocumentData(payload.path, payload.documentData, payload.index); }