multifader: fix horizontal mode

This commit is contained in:
jean-emmanuel 2016-10-12 21:20:16 +02:00
parent 420964f4bd
commit dcefee581e
2 changed files with 26 additions and 1 deletions

View file

@ -61,7 +61,7 @@ var Multifader = function(widgetData) {
data.path = widgetData.path + '/' + i
var element = parsewidgets([data],this.widget)
element[0].setAttribute('style',`width:${100/widgetData.strips}%`)
element[0].setAttribute('style',`${widgetData.horizontal?'height':'width'}:${100/widgetData.strips}%`)
element[0].classList.add('not-editable')
if (widgetData.traversing) element.find('.fader-wrapper').off('drag')

View file

@ -33,6 +33,31 @@
align-items:stretch;
&.horizontal {
flex-direction: column;
.fader-container {
flex-direction: row;
width: 100%;
.fader {
width:100%;
}
.label {
width:35rem;
height:100%;
border-bottom:0;
border-right:1rem solid var(--color-bg);
max-height: initial;
span {
transform: rotate(180deg);
display: block;
position: relative;
overflow: hidden;
text-overflow: ellipsis;
-webkit-writing-mode:vertical-lr;
text-align: center;
height:100%;
}
}
}
}
}
.widget {