1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-28 17:20:13 +02:00

port takeScreenshot

This commit is contained in:
Kushagra Gour
2018-06-09 14:42:01 +05:30
parent a986bce81f
commit ae675ef985
4 changed files with 154 additions and 2 deletions

View File

@@ -85,7 +85,6 @@ export default class ContentWrap extends Component {
}
}, this.updateDelay);
}
clearConsole() {}
createPreviewFile(html, css, js) {
const shouldInlineJs =
@@ -236,6 +235,8 @@ export default class ContentWrap extends Component {
this.cm.css.refresh();
this.cm.js.refresh();
this.clearConsole();
// Set preview only when all modes are updated so that preview doesn't generate on partially
// correct modes and also doesn't happen 3 times.
Promise.all([
@@ -626,6 +627,9 @@ export default class ContentWrap extends Component {
this.props.onCodeSettingsChange('css', settings);
this.setPreviewContent(true);
}
getDemoFrame(callback) {
callback(this.frame);
}
render() {
return (