fix compression row

This commit is contained in:
=
2020-07-08 16:36:30 +02:00
parent 82f16e9b6b
commit 0444ee4e45
3 changed files with 5 additions and 3 deletions
@@ -61,7 +61,8 @@ export default class GanttRow extends Vue {
if (!myrow) rows.push(myrow = []);
// inserisco il mio blocco per occupare la posizione
myrow.push({ from: myStartPosition, to: myEndPosition, id: block.id });
if (block.visible)
myrow.push({ from: myStartPosition, to: myEndPosition, id: block.id });
// la posizione verticale è al posizione della riga nell'elenco delle righe.
return rows.indexOf(myrow) * (this.ganttOptions.elementHeight + this.ganttOptions.elementPadding * 2);
@@ -3,9 +3,8 @@
<g
:transform="`translate(${ganttOptions.stepDuration * ganttOptions.secondSize + paddingHorizontal} 0) scale(${zoomFactor} ${zoomFactor})`"
>
<template v-for="b in blocksInSection">
<template v-for="b in blocksInSection.filter( i=> i.visible)">
<block
v-if="b.visible"
:key="b.id"
:value="b"
:x="startPosition(b)"
@@ -24,6 +24,7 @@
<span>{{`process-heating` | localize('Riscaldo')}}</span>
</gantt-row>
<gantt-row
v-if="getRowHeight($refs.section1)"
:padding-horizontal="padX "
:padding-vertical="getRowHeight($refs.section1) + ganttOptions.elementPadding"
:section="2"
@@ -34,6 +35,7 @@
<span>{{`process-forming` | localize('Formatura')}}</span>
</gantt-row>
<gantt-row
v-if="getRowHeight($refs.section1)+ getRowHeight($refs.section2)"
:padding-horizontal="padX "
ref="section3"
:padding-vertical="getRowHeight($refs.section1) + getRowHeight($refs.section2) + ganttOptions.elementPadding*2"