add live updates when sketch is playing

This commit is contained in:
catarak 2016-05-12 18:11:09 -04:00
parent 8b04d04bb3
commit 18dd7c6541
2 changed files with 10 additions and 0 deletions

View file

@ -46,6 +46,10 @@ class PreviewFrame extends React.Component {
this.clearPreview();
}
}
if (this.props.isPlaying && this.props.content != prevProps.content) {
this.renderSketch();
}
}
componentWillUnmount() {

View file

@ -1,6 +1,12 @@
.toolbar__play-button {
@extend %toolbar-button;
margin-right: #{15 / $base-font-size}rem;
&.playing {
background-color: $light-button-background-hover-color;
& g {
fill: $light-button-hover-color;
}
}
}
.toolbar__stop-button {