really clear sketch when sketch is stopped
This commit is contained in:
parent
e7ea35fa60
commit
8b69ab7fdd
1 changed files with 2 additions and 7 deletions
|
@ -115,15 +115,10 @@ class PreviewFrame extends React.Component {
|
|||
renderSketch() {
|
||||
const doc = ReactDOM.findDOMNode(this);
|
||||
if (this.props.isPlaying) {
|
||||
// TODO add polyfill for this
|
||||
// doc.srcdoc = this.injectLocalFiles();
|
||||
srcDoc.set(doc, this.injectLocalFiles());
|
||||
} else {
|
||||
// doc.srcdoc = '';
|
||||
doc.srcdoc = '';
|
||||
srcDoc.set(doc, ' ');
|
||||
doc.contentWindow.document.open();
|
||||
doc.contentWindow.document.write('');
|
||||
doc.contentWindow.document.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue