diff --git a/app/browser/js/app/widgets.js b/app/browser/js/app/widgets.js
index f2f60c15..138163da 100644
--- a/app/browser/js/app/widgets.js
+++ b/app/browser/js/app/widgets.js
@@ -13,9 +13,9 @@ var widgets = {
rgb: require('./widgets/rgb'),
// matrices
- multitoggle: require('./widgets/multitoggle'),
- multipush: require('./widgets/multipush'),
- multifader: require('./widgets/multifader'),
+ multitoggle: require('./widgets/matrices/multitoggle'),
+ multipush: require('./widgets/matrices/multipush'),
+ multifader: require('./widgets/matrices/multifader'),
// plots
led: require('./widgets/plots/led'),
diff --git a/app/browser/js/app/widgets/matrices/_matrices_base.js b/app/browser/js/app/widgets/matrices/_matrices_base.js
new file mode 100644
index 00000000..9cd995ea
--- /dev/null
+++ b/app/browser/js/app/widgets/matrices/_matrices_base.js
@@ -0,0 +1,36 @@
+var _widgets_base = require('../common/_widgets_base')
+
+var _matrices_base = module.exports = function(widgetData){
+
+ _widgets_base.apply(this,arguments)
+
+ this.widget = $(`
+
+
\
+ `)
+ this.value = []
+
+ this.widget.getValue = function(){
+ console.log(this.value)
+ return this.value
+ }.bind(this)
+
+ this.widget.on('sync',function(e){
+ if (e.id==this.widgetData.id) return
+ this.value[e.widget.parent().index()] = e.widget.getValue()
+ this.widget.trigger({type:'sync',id:this.widgetData.id,widget:this.widget})
+ }.bind(this))
+
+ this.widget.enableTraversingGestures()
+
+}
+
+
+
+_matrices_base.prototype = Object.create(_widgets_base.prototype)
+
+_matrices_base.prototype.constructor = _matrices_base
+
+_matrices_base.prototype.getValue = function(){
+ return this.value
+}
diff --git a/app/browser/js/app/widgets/matrices/multifader.js b/app/browser/js/app/widgets/matrices/multifader.js
new file mode 100644
index 00000000..38207ef4
--- /dev/null
+++ b/app/browser/js/app/widgets/matrices/multifader.js
@@ -0,0 +1,72 @@
+var _matrices_base = require('./_matrices_base')
+
+module.exports.options = {
+ type:'multifader',
+ id:'auto',
+
+ separator0:'Matrix',
+
+ strips:2,
+
+ separator1:'style',
+
+ label:'auto',
+ unit:'',
+ left:'auto',
+ top:'auto',
+ width:'auto',
+ height:'auto',
+ color:'auto',
+ compact:false,
+ css:'',
+
+
+ separator2:'osc',
+
+ range:{min:0,max:1},
+ logScale:false,
+ precision:2,
+ path:'auto',
+ preArgs:[],
+ target:[]
+}
+
+
+var Multifader = function(widgetData) {
+
+ _matrices_base.apply(this,arguments)
+
+ for (var i=0;i
- \
- `),
- $document = $(document)
+var Multipush = function(widgetData) {
- widget.value = []
+ _matrices_base.apply(this,arguments)
- for (var i=0;i
- \
- `),
- $document = $(document)
+ _matrices_base.apply(this,arguments)
- widget.value = []
-
- for (var i=0;i
- \
- `),
- $document = $(document)
-
- widget.value = []
-
- for (var i=0;i