Use border style to draw fhm line
This commit is contained in:
@@ -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 {
|
|||||||
</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 = {
|
|||||||
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,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user