editor: use a class on body to toggle the grid's visibility
This commit is contained in:
parent
2437c07ff4
commit
cf8130e589
2 changed files with 12 additions and 8 deletions
|
|
@ -122,6 +122,8 @@ module.exports = {
|
|||
$('.enable-editor').addClass('on')
|
||||
$('.disable-editor').removeClass('on')
|
||||
$('body').addClass('editor-enabled')
|
||||
.toggleClass('no-grid', GRIDWIDTH==1)
|
||||
|
||||
EDITING = true
|
||||
|
||||
|
||||
|
|
@ -135,6 +137,7 @@ module.exports = {
|
|||
if (isNaN(v)) return
|
||||
i.val(v)
|
||||
GRIDWIDTH = v
|
||||
$('body').toggleClass('no-grid', GRIDWIDTH==1)
|
||||
document.documentElement.style.setProperty("--grid-width",GRIDWIDTH)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue