crossfader: tweak layout for ios compatibility (issue #121)
This commit is contained in:
parent
7dbe6ec8d1
commit
cac62b1142
2 changed files with 22 additions and 18 deletions
|
|
@ -26,12 +26,20 @@ module.exports = class Crossfader extends Switcher {
|
|||
this.fader = new Fader({props:{
|
||||
...faderDefaults,
|
||||
horizontal: this.getProp('horizontal'),
|
||||
range: {min:{'A':0}, '50%':{" ":0.5},max:{'B':1}}
|
||||
range: {min:{'A':0}, '50%':{" ":0.5},max:{'B':1}},
|
||||
input: false
|
||||
}, parent: this})
|
||||
|
||||
this.fader.sendValue = ()=>{}
|
||||
|
||||
this.widget.appendChild(DOM.create('<div class="fader-container"></div>')).appendChild(this.fader.widget)
|
||||
this.widget.appendChild(this.fader.widget)
|
||||
|
||||
if (this.getProp('horizontal')) {
|
||||
this.widget.classList.add('horizontal')
|
||||
} else {
|
||||
this.widget.classList.add('vertical')
|
||||
|
||||
}
|
||||
|
||||
this.fader.on('change', (e)=>{
|
||||
|
||||
|
|
|
|||
|
|
@ -119,28 +119,24 @@
|
|||
padding: 2rem;
|
||||
.switch {
|
||||
flex:2;
|
||||
height: auto;
|
||||
border: 1rem solid var(--color-bg) !important;
|
||||
}
|
||||
.fader {
|
||||
flex: 3;
|
||||
--color-pips: var(--color-custom);
|
||||
--color-gauge: var(--color-custom);
|
||||
--color-knob: var(--color-custom);
|
||||
}
|
||||
&.vertical {
|
||||
flex-direction: row;
|
||||
.fader, .fader canvas {
|
||||
height:auto;
|
||||
}
|
||||
}
|
||||
&.horizontal {
|
||||
flex-direction: column;
|
||||
.switch {
|
||||
flex:2;
|
||||
height: auto;
|
||||
}
|
||||
.fader-container {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
.fader-container {
|
||||
height: 100%;
|
||||
flex:3;
|
||||
.input {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.panel:not(.tab) > .crossfader-container {
|
||||
--color-border:var(--color-fg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue