table layout for modulators
This commit is contained in:
parent
501fca079e
commit
07c4826bd9
26
lfogui.css
26
lfogui.css
@ -3,12 +3,31 @@
|
|||||||
--unlocked-color: #ff5153;
|
--unlocked-color: #ff5153;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--background: ivory;
|
||||||
|
--active: royalblue;
|
||||||
|
--nonactive: lightsteelblue;
|
||||||
|
--alert: red;
|
||||||
|
--textcolor: #737373;
|
||||||
|
}
|
||||||
|
|
||||||
|
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
|
||||||
|
|
||||||
|
html {
|
||||||
|
background-color: var(--background);
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: "Poppins", sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
border: 0;
|
border: 0;
|
||||||
overflow: hidden; /* Disable scrollbars */
|
overflow-x: hidden; /* no horizontal scrollbar*/
|
||||||
|
overflow-y: scroll;
|
||||||
display: block; /* No floating content on sides */
|
display: block; /* No floating content on sides */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,6 +43,9 @@ li {
|
|||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
overflow: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
input[type=number] {
|
input[type=number] {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
@ -192,7 +214,7 @@ h5 {
|
|||||||
color : white;
|
color : white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
14
lfogui.js
14
lfogui.js
@ -30,8 +30,8 @@ const LockModes = Object.freeze({
|
|||||||
var modPhases = Array(MAXLFOS).fill(0);
|
var modPhases = Array(MAXLFOS).fill(0);
|
||||||
var firstUpdateTime = Date.now();
|
var firstUpdateTime = Date.now();
|
||||||
|
|
||||||
const MODULATORLABELS = ["inst", "-type-", "---shape---", "-------param-------", "--timebase--", "-min-", "-max", "-phase-", "center"];
|
const MODULATORLABELS = ["inst", "type", "shape", "param", "timebase", "min", "max", "phase", "center"];
|
||||||
const ENUMERATORLABELS = ["inst", "---parameter---", "-# points-"];
|
const ENUMERATORLABELS = ["inst", "parameter", "# points"];
|
||||||
|
|
||||||
|
|
||||||
function parseLfoTimeNonMusical(lfoTime) {
|
function parseLfoTimeNonMusical(lfoTime) {
|
||||||
@ -556,13 +556,15 @@ function MasterLfoHandler(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
return e('div', null,
|
return e('div', null,
|
||||||
e('div', {className: 'container'},
|
e('div', { className: 'header' },
|
||||||
e(Switch, { ontoggle: toggleViewMode }, null),
|
e(Switch, { ontoggle: toggleViewMode }, null),
|
||||||
e('span', { className: lockClass, onClick: toggleLockMode }, null)),
|
e('span', { className: lockClass, onClick: toggleLockMode }, null)),
|
||||||
|
|
||||||
e('h5', null, title),
|
//e('h5', null, title),
|
||||||
e('ul', null, ...labels.map(x => ListItem(Label(x)))),
|
e('table', { id: 'table' },
|
||||||
e('div', {id: 'grid'}, ...grid)
|
e('thead', null, e('tr', { id: 'headers' }, ...labels.map(x => e('th', null, x)))),
|
||||||
|
e('tbody', null, ...grid)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,9 @@ function ControlType(){
|
|||||||
return e('select', {className: 'control-type'}, Option("LFO"));
|
return e('select', {className: 'control-type'}, Option("LFO"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function DataCell(element) {
|
||||||
|
return e('td', null, element);
|
||||||
|
}
|
||||||
|
|
||||||
function LfoRow(props){
|
function LfoRow(props){
|
||||||
|
|
||||||
@ -34,27 +36,27 @@ function LfoRow(props){
|
|||||||
let typeOption = null;
|
let typeOption = null;
|
||||||
|
|
||||||
if (props.type == "LFO"){
|
if (props.type == "LFO"){
|
||||||
typeOption = ListItem(DropDown({locked:props.locked, onChange: props.setShape, value:props.shape, options: SHAPETYPES}));
|
typeOption = DataCell(DropDown({locked:props.locked, onChange: props.setShape, value:props.shape, options: SHAPETYPES}));
|
||||||
}
|
}
|
||||||
else if (props.type == "Noise"){
|
else if (props.type == "Noise"){
|
||||||
typeOption = ListItem(DropDown({locked:props.locked, onChange: props.setNoise, value:props.noise, options: NOISETYPES}));
|
typeOption = DataCell(DropDown({locked:props.locked, onChange: props.setNoise, value:props.noise, options: NOISETYPES}));
|
||||||
}
|
}
|
||||||
|
|
||||||
let content = e('ul', {className: 'lfo-item'},
|
let content = e('tr', {className: 'lfo-item'},
|
||||||
ListItem(DropDown({locked:props.locked, onChange: props.setInstanceNum, value:props.instanceNum, options: INSTANCEOPTIONS})),
|
DataCell(DropDown({locked:props.locked, onChange: props.setInstanceNum, value:props.instanceNum, options: INSTANCEOPTIONS})),
|
||||||
ListItem(DropDown({locked:props.locked, options: TYPEOPTIONS, onChange: props.setType, value:props.type})),
|
DataCell(DropDown({locked:props.locked, options: TYPEOPTIONS, onChange: props.setType, value:props.type})),
|
||||||
typeOption,
|
typeOption,
|
||||||
ListItem(DropDown({locked:props.locked, onChange: props.setDjParam, value: props.djParam, options: MODPARAMOPTIONS})),
|
DataCell(DropDown({locked:props.locked, onChange: props.setDjParam, value: props.djParam, options: MODPARAMOPTIONS})),
|
||||||
ListItem(e("input", {onChange:props.setFreq, value:props.freq, className:"timeInput"}, null)),
|
DataCell(e("input", {onChange:props.setFreq, value:props.freq, className:"timeInput"}, null)),
|
||||||
ListItem(e(NumberBox, {onChange:props.setMin, value:props.min, step:0.1}, null)),
|
DataCell(e(NumberBox, {onChange:props.setMin, value:props.min, step:0.1}, null)),
|
||||||
ListItem(e(NumberBox, {onChange:props.setMax, value:props.max, step:0.1}, null)),
|
DataCell(e(NumberBox, {onChange:props.setMax, value:props.max, step:0.1}, null)),
|
||||||
//ListItem(e(NumberBox, {onChange:props.setAmp, value:props.amp, step:0.1}, null)),
|
//DataCell(e(NumberBox, {onChange:props.setAmp, value:props.amp, step:0.1}, null)),
|
||||||
ListItem(e(NumberBox, {onChange:props.setPhase, value:props.phase, step:0.1}, null)),
|
DataCell(e(NumberBox, {onChange:props.setPhase, value:props.phase, step:0.1}, null)),
|
||||||
ListItem(e("div", {className:"base-val"}, center.toString())),
|
DataCell(e("div", {className:"base-val"}, center.toString())),
|
||||||
ListItem(e("input", {type: 'range', min: 0, max: 1, step: 0.01, readonly: true, id: `slider-${props.instanceNum}-${props.djParam}`})),
|
DataCell(e("input", {type: 'range', min: 0, max: 1, step: 0.01, readonly: true, id: `slider-${props.instanceNum}-${props.djParam}`})),
|
||||||
ListItem(e(Button, {text:'+', onClick: props.addLfo, locked: props.locked}, null)),
|
DataCell(e(Button, {text:'+', onClick: props.addLfo, locked: props.locked}, null)),
|
||||||
ListItem(e(Button, {text:'-', onClick: props.removeLfo, locked: props.locked}, null)),
|
DataCell(e(Button, {text:'-', onClick: props.removeLfo, locked: props.locked}, null)),
|
||||||
ListItem(e("div", {className:"linked"}, linkedText)),
|
DataCell(e("div", {className:"linked"}, linkedText)),
|
||||||
);
|
);
|
||||||
if (props.visible){
|
if (props.visible){
|
||||||
return content;
|
return content;
|
||||||
|
Loading…
Reference in New Issue
Block a user