1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-29 09:40:10 +02:00

Remove dom access for runBtn

This commit is contained in:
Kushagra Gour
2019-07-17 14:03:02 +05:30
parent 1a333036af
commit f365503489
2 changed files with 20 additions and 19 deletions

View File

@@ -1,4 +1,4 @@
/* global htmlCodeEl, cssCodeEl, jsCodeEl, runBtn
/* global htmlCodeEl, cssCodeEl, jsCodeEl
*/
import { h, Component } from 'preact';
@@ -973,12 +973,6 @@ export default class App extends Component {
}
const prefs = this.state.prefs;
// Show/hide RUN button based on autoPreview setting.
let autoPreview =
window.forcedSettings.autoPreview !== undefined
? window.forcedSettings
: prefs.autoPreview;
runBtn.classList[autoPreview ? 'add' : 'remove']('hide');
this.contentWrap.applyCodemirrorSettings(this.state.prefs);
@@ -1594,6 +1588,7 @@ export default class App extends Component {
title={this.state.currentItem.title}
titleInputBlurHandler={this.titleInputBlurHandler.bind(this)}
user={this.state.user}
isAutoPreviewOn={this.state.prefs.autoPreview}
unsavedEditCount={this.state.unsavedEditCount}
isFileMode={
this.state.currentItem && this.state.currentItem.files