1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-23 23:11:12 +02:00

remove dom access

This commit is contained in:
Kushagra Gour
2019-07-16 22:03:05 +05:30
parent 9558dff0b1
commit 73e89f7a89
2 changed files with 13 additions and 16 deletions

View File

@@ -462,9 +462,6 @@ export default class ContentWrap extends Component {
this.props.onCodeModeChange('css', value);
this.props.currentItem.cssMode = value;
this.cm.css.setOption('readOnly', modes[value].cmDisable);
window.cssSettingsBtn.classList[
modes[value].hasSettings ? 'remove' : 'add'
]('hide');
this.cm.css.setLanguage(value);
return handleModeRequirements(value);
}
@@ -733,17 +730,19 @@ export default class ContentWrap extends Component {
</select>
</label>
<div class="code-wrap__header-right-options">
<a
href="#"
id="cssSettingsBtn"
title="Atomic CSS configuration"
onClick={this.cssSettingsBtnClickHandler.bind(this)}
class="code-wrap__header-btn hide"
>
<svg>
<use xlinkHref="#settings-icon" />
</svg>
</a>
{modes[this.props.currentItem.cssMode || 'css'].hasSettings && (
<a
href="#"
id="cssSettingsBtn"
title="Atomic CSS configuration"
onClick={this.cssSettingsBtnClickHandler.bind(this)}
class="code-wrap__header-btn"
>
<svg>
<use xlinkHref="#settings-icon" />
</svg>
</a>
)}
<a
class="code-wrap__header-btn "
title="Format code"

View File

@@ -286,8 +286,6 @@ export default class App extends Component {
this.setState(prevState => {
const newCount = prevState.unsavedEditCount + 1;
console.log('checking on ', newCount);
if (
newCount % UNSAVED_WARNING_COUNT === 0 &&
newCount >= UNSAVED_WARNING_COUNT