polotno-node 2.9.11 → 2.9.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polotno-node",
3
- "version": "2.9.11",
3
+ "version": "2.9.12",
4
4
  "description": "Polotno workflow from NodeJS",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/video-parallel.js CHANGED
@@ -194,10 +194,10 @@ module.exports.jsonToVideo = async function jsonToVideo(inst, json, attrs) {
194
194
  'base64'
195
195
  );
196
196
  finishedFramesNumber += 1;
197
- const progress = ((finishedFramesNumber / framesNumber) * 100).toFixed(
198
- 1
199
- );
200
- // printProgress(progress);
197
+ if (attrs.onProgress) {
198
+ const progress = finishedFramesNumber / framesNumber;
199
+ attrs.onProgress(progress);
200
+ }
201
201
  }
202
202
  await page.close();
203
203
  if (typeof inst === 'function') {