From fd6268c940da13c6938d829064e92aa38160fe6e Mon Sep 17 00:00:00 2001 From: DD Liu Date: Wed, 9 May 2018 10:51:49 -0400 Subject: [PATCH] Queue perform snapshot (#430) --- src/containers/paper-canvas.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/containers/paper-canvas.jsx b/src/containers/paper-canvas.jsx index 355e37f8..7382d9d2 100644 --- a/src/containers/paper-canvas.jsx +++ b/src/containers/paper-canvas.jsx @@ -250,7 +250,10 @@ class PaperCanvas extends React.Component { .subtract(itemWidth, itemHeight)); } - performSnapshot(paperCanvas.props.undoSnapshot, Formats.VECTOR_SKIP_CONVERT); + // Without the callback, the transforms sometimes don't finish applying before the + // snapshot is taken. + window.setTimeout( + () => performSnapshot(paperCanvas.props.undoSnapshot, Formats.VECTOR_SKIP_CONVERT), 0); } }); }