editor: use a class on body to toggle the grid's visibility

This commit is contained in:
jean-emmanuel 2016-12-13 13:20:30 +01:00
parent 2437c07ff4
commit cf8130e589
2 changed files with 12 additions and 8 deletions

View file

@ -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)
})
})