From 21ee8655ab76b062d8898a71f3aeae3a1f7a49a5 Mon Sep 17 00:00:00 2001 From: zrispo Date: Wed, 15 Apr 2020 14:45:49 -0400 Subject: [PATCH] improve GIF export in progress messages --- src/Editor/EditorCore.jsx | 6 +++++- src/Editor/export/GIFExport.js | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Editor/EditorCore.jsx b/src/Editor/EditorCore.jsx index e5b709715..09df8c17d 100644 --- a/src/Editor/EditorCore.jsx +++ b/src/Editor/EditorCore.jsx @@ -942,10 +942,14 @@ class EditorCore extends Component { } let onFinish = (gifBlob) => { + saveAs(gifBlob, outputName + '.gif'); this.updateToast(toastID, { type: 'success', text: "Successfully created .gif file." }); - saveAs(gifBlob, outputName + '.gif'); + this.setState({ + renderStatusMessage: 'Finished exporting GIF.', + renderProgress: 100 + }); } GIFExport.createAnimatedGIFFromProject({ diff --git a/src/Editor/export/GIFExport.js b/src/Editor/export/GIFExport.js index 8ccf14acc..13f79ab0f 100644 --- a/src/Editor/export/GIFExport.js +++ b/src/Editor/export/GIFExport.js @@ -22,7 +22,7 @@ class GIFExport { }); gif.on('finished', (gif) => { - onProgress('Finished GIF export', 100); + onProgress('Saving GIF file (this may take a while)...', 99); onFinish(gif); }); @@ -31,6 +31,7 @@ class GIFExport { // Add frame to gif. gif.addFrame(image, {delay: 1000/project.framerate}); }); + onProgress('Rendering GIF file (this may take a while)...', 99); gif.render(); // Finalize gif render. }