matrix: add borders option

This commit is contained in:
jean-emmanuel 2018-06-29 08:33:22 +02:00
parent ed683509d4
commit 00d76db844
3 changed files with 17 additions and 0 deletions

View file

@ -30,6 +30,7 @@ class Matrix extends _matrix_base {
start:0,
spacing:0,
traversing:true,
borders:true,
props:{},
_value: 'value',
@ -55,6 +56,8 @@ class Matrix extends _matrix_base {
this.widget.style.setProperty('--rows', this.getProp('matrix')[1])
this.widget.style.setProperty('--spacing', this.getProp('spacing') + 'rem')
if (this.getProp('borders') === false) this.widget.classList.add('noborders')
if (parser.widgets[this.getProp('widgetType')]) {
for (var i = this.start; i < this.getProp('matrix')[0] * this.getProp('matrix')[1] + this.start; i++) {

View file

@ -22,6 +22,7 @@
flex-direction: row;
padding:1rem 2rem 2rem 1rem;
touch-action: none;
--color-border:var(--color-bg);
> .widget {
min-height: 0;
@ -34,6 +35,13 @@
border:0;
}
}
&.noborders {
.widget{
border: none;
box-shadow:none;
}
}
}
.multifader-container {