bug fixes (#666)
This commit is contained in:
parent
617f00653c
commit
bee02e01ab
1 changed files with 6 additions and 0 deletions
|
@ -31,6 +31,12 @@ class PreviewFrame extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate(prevProps) {
|
componentDidUpdate(prevProps) {
|
||||||
|
// if sketch starts or stops playing, want to rerender
|
||||||
|
if (this.props.isPlaying !== prevProps.isPlaying) {
|
||||||
|
this.renderSketch();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// if the user explicitly clicks on the play button
|
// if the user explicitly clicks on the play button
|
||||||
if (this.props.isPlaying && this.props.previewIsRefreshing) {
|
if (this.props.isPlaying && this.props.previewIsRefreshing) {
|
||||||
this.renderSketch();
|
this.renderSketch();
|
||||||
|
|
Loading…
Reference in a new issue