Skip to content

Commit

Permalink
improve GIF export in progress messages
Browse files Browse the repository at this point in the history
  • Loading branch information
zachrispoli committed Apr 15, 2020
1 parent f575a53 commit 21ee865
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/Editor/EditorCore.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
3 changes: 2 additions & 1 deletion src/Editor/export/GIFExport.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

Expand All @@ -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.
}

Expand Down

0 comments on commit 21ee865

Please sign in to comment.