mobile: fix build for real
This commit is contained in:
parent
8fb4662bd1
commit
c945b8decf
3 changed files with 6 additions and 9 deletions
|
|
@ -120,7 +120,7 @@ module.exports = {
|
|||
editor.toggleGrid()
|
||||
})
|
||||
})
|
||||
updateMobileThemeColor()
|
||||
updateMobileThemeColor(root)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
var chroma = require('chroma-js'),
|
||||
fastdom = require('fastdom'),
|
||||
widgetManager
|
||||
fastdom = require('fastdom')
|
||||
|
||||
module.exports = {
|
||||
|
||||
|
|
@ -43,12 +42,10 @@ module.exports = {
|
|||
|
||||
},
|
||||
|
||||
updateMobileThemeColor: function(){
|
||||
|
||||
if (!widgetManager) widgetManager = require('../managers/widgets')
|
||||
updateMobileThemeColor: function(root) {
|
||||
|
||||
fastdom.measure(()=>{
|
||||
var root = widgetManager.getWidgetById('root')[0]
|
||||
|
||||
var style = window.getComputedStyle(root ? root.widget : document.documentElement)
|
||||
|
||||
fastdom.mutate(()=>{
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ class Root extends StaticProperties(Panel, {visible: true, label: false, id: 'ro
|
|||
this.checkMenuVisibility()
|
||||
return
|
||||
case 'colorBg':
|
||||
updateMobileThemeColor()
|
||||
updateMobileThemeColor(this)
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ class Root extends StaticProperties(Panel, {visible: true, label: false, id: 'ro
|
|||
setCssVariables() {
|
||||
|
||||
super.setCssVariables()
|
||||
updateMobileThemeColor()
|
||||
updateMobileThemeColor(this)
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue