From 0b811f6a15290713df764a7341105b3dba3d9919 Mon Sep 17 00:00:00 2001 From: tina <lt-bloody@riox.eu> Date: Fri, 28 Sep 2018 20:04:58 +0200 Subject: [PATCH] fixes more line length --- components/chart/chart.js | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/components/chart/chart.js b/components/chart/chart.js index a6bebc32..97717df3 100644 --- a/components/chart/chart.js +++ b/components/chart/chart.js @@ -63,7 +63,8 @@ export default class CycleChart extends Component { this.xAxisHeight = this.state.chartHeight * config.xAxisHeightPercentage const remainingHeight = this.state.chartHeight - this.xAxisHeight this.symptomHeight = config.symptomHeightPercentage * remainingHeight - this.symptomRowHeight = this.symptomRowSymptoms.length * this.symptomHeight + this.symptomRowHeight = this.symptomRowSymptoms.length * + this.symptomHeight this.columnHeight = remainingHeight - this.symptomRowHeight const chartSymptoms = [...this.symptomRowSymptoms] @@ -120,7 +121,8 @@ export default class CycleChart extends Component { (cycleDay.cervix.opening + cycleDay.cervix.firmness) } else if (symptom === 'sex') { // solo = 1 + partner = 2 - acc.sex = cycleDay.sex && (cycleDay.sex.solo + 2 * cycleDay.sex.partner) + acc.sex = cycleDay.sex && + (cycleDay.sex.solo + 2 * cycleDay.sex.partner) } else if (symptom === 'pain') { // is any pain documented? acc.pain = cycleDay.pain && @@ -165,10 +167,13 @@ export default class CycleChart extends Component { style={{ alignItems: 'center', justifyContent: 'center' }} key={symptomName} width={styles.yAxis.width} - height={this.symptomRowHeight / this.symptomRowSymptoms.length} + height={this.symptomRowHeight / + this.symptomRowSymptoms.length} > <Svg - width={styles.yAxis.width * 0.8} height={this.symptomRowHeight / this.symptomRowSymptoms.length * 0.8} + width={styles.yAxis.width * 0.8} + height={this.symptomRowHeight / + this.symptomRowSymptoms.length * 0.8} viewBox={symptomIcons[symptomName].viewBox} > <G fill={symptomIcons[symptomName].color}> @@ -182,10 +187,16 @@ export default class CycleChart extends Component { {makeYAxisLabels(this.columnHeight)} </View> <View style={[styles.yAxis, {height: this.xAxisHeight}]}> - <AppText style = {[styles.column.label.number, styles.yAxisLabels.cycleDayLabel]}> + <AppText style = {[ + styles.column.label.number, + styles.yAxisLabels.cycleDayLabel + ]}> {labels.cycleDayWithLinebreak} </AppText> - <AppText style={[styles.column.label.date,styles.yAxisLabels.dateLabel]}> + <AppText style={[ + styles.column.label.date, + styles.yAxisLabels.dateLabel + ]}> {labels.date} </AppText> </View> -- GitLab