well I ... almost got it
it seems that the set method doesn't apply to matrix (the get method returns an array with the children values, not the scroll position, so I guess that's why the set method doesn't affect the scroll position)
so I try to put the matrix inside a panel, but then cannot get scrollbars on the panel (contain = false, scroll = true .. but no scrollbar unless I put some big dumb value on matrix height)
{
"createdWith": "Open Stage Control",
"version": "1.25.2",
"type": "session",
"content": {
"type": "root",
"lock": false,
"id": "root",
"visible": true,
"interaction": true,
"comments": "",
"width": "auto",
"height": "auto",
"colorText": "auto",
"colorWidget": "auto",
"alphaFillOn": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"colorBg": "auto",
"layout": "default",
"justify": "start",
"gridTemplate": "",
"contain": true,
"scroll": true,
"innerPadding": true,
"tabsPosition": "top",
"hideMenu": false,
"variables": "@{parent.variables}",
"traversing": false,
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": "",
"widgets": [
{
"type": "button",
"top": 10,
"left": 660,
"lock": false,
"id": "button_1",
"visible": true,
"interaction": true,
"comments": "",
"width": "auto",
"height": "auto",
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"colorTextOn": "auto",
"label": "scroll",
"vertical": false,
"wrap": false,
"on": 1,
"off": 0,
"mode": "tap",
"doubleTap": false,
"decoupled": false,
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": "set('scrollvar',get('scrollvar')+20)\nif (get('scrollvar') > 100) {\n set('scrollvar',0)\n}\nset("panel_1",[0,get('scrollvar')/100])\nset("matrix_1",[0,get('scrollvar')/100])\nset("panel_2",[0,get('scrollvar')/100])"
},
{
"type": "variable",
"lock": false,
"id": "scrollvar",
"comments": "",
"value": 0,
"default": 0,
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": ""
},
{
"type": "button",
"top": 80,
"left": 660,
"lock": false,
"id": "button_2",
"visible": true,
"interaction": true,
"comments": "",
"width": "auto",
"height": "auto",
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"colorTextOn": "auto",
"label": "reset",
"vertical": false,
"wrap": false,
"on": 1,
"off": 0,
"mode": "tap",
"doubleTap": false,
"decoupled": false,
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": "set('scrollvar',0)\nset("panel_1",[0,get('scrollvar')])\nset("matrix_1",[0,get('scrollvar')/100])\nset("panel_2",[0,get('scrollvar')])\n"
},
{
"type": "button",
"top": 220,
"left": 660,
"lock": false,
"id": "button_3",
"visible": true,
"interaction": true,
"comments": "",
"width": "auto",
"height": "auto",
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"colorTextOn": "auto",
"label": "log",
"vertical": false,
"wrap": false,
"on": 1,
"off": 0,
"mode": "tap",
"doubleTap": false,
"decoupled": false,
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": "console.log(get("matrix_1"));"
},
{
"type": "panel",
"top": 10,
"left": 20,
"lock": false,
"id": "panel_1",
"visible": true,
"interaction": true,
"comments": "",
"width": 130,
"height": 510,
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"colorBg": "auto",
"layout": "default",
"justify": "start",
"gridTemplate": "",
"contain": false,
"scroll": true,
"innerPadding": true,
"tabsPosition": "top",
"variables": "@{parent.variables}",
"traversing": false,
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": "",
"widgets": [
{
"type": "fader",
"top": 130,
"left": 50,
"lock": false,
"id": "fader_1",
"visible": true,
"interaction": true,
"comments": "",
"width": "auto",
"height": 540,
"expand": "false",
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"design": "default",
"knobSize": "auto",
"horizontal": false,
"pips": false,
"dashed": false,
"gradient": ,
"snap": false,
"spring": false,
"doubleTap": false,
"range": {
"min": 0,
"max": 1
},
"logScale": false,
"sensitivity": 1,
"steps": "",
"origin": "auto",
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": "",
"onTouch": ""
}
],
"tabs":
},
{
"type": "matrix",
"top": 10,
"left": 160,
"lock": false,
"id": "matrix_1",
"visible": true,
"interaction": true,
"comments": "",
"width": "auto",
"height": 450,
"expand": true,
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"colorBg": "auto",
"layout": "vertical",
"justify": "start",
"gridTemplate": "",
"contain": false,
"scroll": true,
"innerPadding": true,
"tabsPosition": "top",
"variables": "@{parent.variables}",
"traversing": false,
"widgetType": "text",
"quantity": 100,
"props": "JS{\nvar props = {}\nprops.height=30;\nprops.value = \nreturn props;\n}\n",
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": "",
"widgets": [],
"tabs": []
},
{
"type": "panel",
"top": 10,
"left": 380,
"lock": false,
"id": "panel_2",
"visible": true,
"interaction": true,
"comments": "",
"width": "auto",
"height": 450,
"expand": false,
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"colorBg": "auto",
"layout": "vertical",
"justify": "start",
"gridTemplate": "",
"contain": false,
"scroll": true,
"innerPadding": true,
"tabsPosition": "top",
"variables": "@{parent.variables}",
"traversing": false,
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": "",
"widgets": [
{
"type": "matrix",
"top": 0,
"left": 0,
"lock": false,
"id": "matrix_2",
"visible": true,
"interaction": true,
"comments": "",
"width": "auto",
"height": "auto",
"expand": true,
"colorText": "auto",
"colorWidget": "auto",
"colorStroke": "auto",
"colorFill": "auto",
"alphaStroke": "auto",
"alphaFillOff": "auto",
"alphaFillOn": "auto",
"lineWidth": "auto",
"borderRadius": "auto",
"padding": "auto",
"html": "",
"css": "",
"colorBg": "auto",
"layout": "vertical",
"justify": "start",
"gridTemplate": "",
"contain": false,
"scroll": false,
"innerPadding": false,
"tabsPosition": "top",
"variables": "@{parent.variables}",
"traversing": false,
"widgetType": "text",
"quantity": 100,
"props": "JS{\nvar props = {}\nprops.height=30;\nprops.value = \nreturn props;\n}\n\n",
"value": "",
"default": "",
"linkId": "",
"address": "auto",
"preArgs": "",
"typeTags": "",
"decimals": 2,
"target": "",
"ignoreDefaults": false,
"bypass": false,
"onCreate": "",
"onValue": "",
"widgets": ,
"tabs":
}
],
"tabs":
}
],
"tabs":
}
}