Queue perform snapshot (#430)

This commit is contained in:
DD Liu 2018-05-09 10:51:49 -04:00 committed by GitHub
parent a75262463b
commit fd6268c940
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}
});
}