editor: use css variable --grid-width at startup (allow overriding) and after disabling & enabling the grid

This commit is contained in:
bordun 2021-04-21 16:35:54 +02:00
parent 1c5876246b
commit db165faa9f
4 changed files with 9 additions and 4 deletions

View file

@ -98,7 +98,9 @@ module.exports = {
setTimeout(()=>{
var root = widgetManager.getWidgetById('root')[0]
if (root) root.onPropChanged('color')
GRIDWIDTH = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--grid-width'))
GRIDWIDTH_CSS = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--grid-width'))
editor.toggleGrid()
editor.toggleGrid()
},200)