Skip to content
Snippets Groups Projects
Commit 5460d574 authored by Julia Friesel's avatar Julia Friesel
Browse files

Use border style to draw fhm line

parent f6607b98
No related branches found
No related tags found
No related merge requests found
...@@ -38,19 +38,11 @@ export default class DayColumn extends Component { ...@@ -38,19 +38,11 @@ export default class DayColumn extends Component {
chartHeight chartHeight
} = this.props } = this.props
const columnElements = [] const columnHeight = chartHeight * config.columnHeightPercentage
const xAxisHeight = chartHeight * config.xAxisHeightPercentage
const symptomHeight = chartHeight * config.symptomRowHeightPercentage
if(drawFhmLine) { const columnElements = []
const fhmLine = (<View
position = 'absolute'
top={100}
width={styles.nfpLine.strokeWidth}
height={200}
{...styles.nfpLine}
key='fhm'
/>)
columnElements.push(fhmLine)
}
if(drawLtlAt) { if(drawLtlAt) {
const ltlLine = (<View const ltlLine = (<View
...@@ -89,14 +81,22 @@ export default class DayColumn extends Component { ...@@ -89,14 +81,22 @@ export default class DayColumn extends Component {
</Text> </Text>
) )
const columnHeight = chartHeight * config.columnHeightPercentage // we merge the colors here instead of from the stylesheet because of a RN
const xAxisHeight = chartHeight * config.xAxisHeightPercentage // bug that doesn't apply borderLeftColor otherwise
const symptomHeight = chartHeight * config.symptomRowHeightPercentage const customStyle = {
height: columnHeight,
borderLeftColor: 'grey',
borderRightColor: 'grey'
}
if (drawFhmLine) {
customStyle.borderLeftColor = styles.nfpLine.borderColor
customStyle.borderLeftWidth = 3
}
const column = React.createElement( const column = React.createElement(
TouchableOpacity, TouchableOpacity,
{ {
style: [styles.column.rect, {height: columnHeight}], style: [styles.column.rect, customStyle],
key: this.props.index.toString(), key: this.props.index.toString(),
onPress: () => { onPress: () => {
this.passDateToDayView(dateString) this.passDateToDayView(dateString)
......
...@@ -39,7 +39,6 @@ const styles = { ...@@ -39,7 +39,6 @@ const styles = {
rect: { rect: {
width: config.columnWidth, width: config.columnWidth,
borderStyle: 'solid', borderStyle: 'solid',
borderColor: 'grey',
borderLeftWidth: 0.5, borderLeftWidth: 0.5,
borderRightWidth: 0.5, borderRightWidth: 0.5,
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment