matrices: don't pass css option to children

This commit is contained in:
jean-emmanuel 2017-02-22 11:27:00 +01:00
parent d5d6144b93
commit 369a0cc812
4 changed files with 4 additions and 0 deletions

View file

@ -64,6 +64,7 @@ module.exports = class Keyboard extends _matrices_base {
data.label = false
data.address = widgetData.split ? widgetData.address + '/' + i : widgetData.address
data.preArgs = widgetData.split ? widgetData.preArgs : [i].concat(widgetData.preArgs)
data.css = ''
var element = parsewidgets([data],this.widget)
element[0].classList.add('not-editable')

View file

@ -75,6 +75,7 @@ module.exports = class Multifader extends _matrices_base {
data.address = widgetData.split ? widgetData.address + '/' + i : widgetData.address
data.preArgs = widgetData.split ? widgetData.preArgs : [i].concat(widgetData.preArgs)
data.color = typeof widgetData.color == 'object' ? '' + widgetData.color[i % widgetData.color.length] : widgetData.color
data.css = ''
var element = parsewidgets([data],this.widget)
element[0].style.setProperty(widgetData.horizontal?'height':'width', 100/widgetData.strips + '%')

View file

@ -62,6 +62,7 @@ module.exports = class Multipush extends _matrices_base {
data.address = widgetData.split ? widgetData.address + '/' + i : widgetData.address
data.preArgs = widgetData.split ? widgetData.preArgs : [i].concat(widgetData.preArgs)
data.color = typeof widgetData.color == 'object' ? '' + widgetData.color[i % widgetData.color.length] : widgetData.color
data.css = ''
var element = parsewidgets([data],this.widget)
element[0].style.setProperty('width', 100/widgetData.matrix[0] + '%')

View file

@ -61,6 +61,7 @@ module.exports = class Multitoggle extends _matrices_base {
data.address = widgetData.split ? widgetData.address + '/' + i : widgetData.address
data.preArgs = widgetData.split ? widgetData.preArgs : [i].concat(widgetData.preArgs)
data.color = typeof widgetData.color == 'object' ? '' + widgetData.color[i % widgetData.color.length] : widgetData.color
data.css = ''
var element = parsewidgets([data],this.widget)
element[0].style.setProperty('width', 100/widgetData.matrix[0] + '%')