Skip to content
Snippets Groups Projects
Commit 796d995a authored by mashazyu's avatar mashazyu
Browse files

Move Surface element to TemperatureColumn component

parent 767a2c97
No related branches found
No related tags found
No related merge requests found
import React, { Component } from 'react' import React, { Component } from 'react'
import { TouchableOpacity } from 'react-native' import { TouchableOpacity } from 'react-native'
import { Surface } from 'react-native/Libraries/ART/ReactNativeART'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import { setDate } from '../../slices/date' import { setDate } from '../../slices/date'
import { LocalDate } from 'js-joda' import { LocalDate } from 'js-joda'
import config from '../../config'
import { getCycleDay } from '../../db' import { getCycleDay } from '../../db'
import SymptomCell from './symptom-cell' import SymptomCell from './symptom-cell'
...@@ -158,14 +156,12 @@ class DayColumn extends Component { ...@@ -158,14 +156,12 @@ class DayColumn extends Component {
} }
)} )}
<Surface width={config.columnWidth} height={columnHeight}> <TemperatureColumn
<TemperatureColumn horizontalLinePosition={this.fhmAndLtl.drawLtlAt}
horizontalLinePosition={this.fhmAndLtl.drawLtlAt} isVerticalLine={this.fhmAndLtl.drawFhmLine}
isVerticalLine={this.fhmAndLtl.drawFhmLine} data={this.data && this.data.temperature}
data={this.data && this.data.temperature} columnHeight={columnHeight}
columnHeight={columnHeight} />
/>
</Surface>
<CycleDayLabel <CycleDayLabel
height={xAxisHeight} height={xAxisHeight}
......
import React from 'react' import React from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import { Group, Path } from 'react-native/Libraries/ART/ReactNativeART' import { Surface , Path } from 'react-native/Libraries/ART/ReactNativeART'
import ChartLine from './chart-line' import ChartLine from './chart-line'
import DotAndLine from './dot-and-line' import DotAndLine from './dot-and-line'
...@@ -19,7 +19,7 @@ const TemperatureColumn = ({ ...@@ -19,7 +19,7 @@ const TemperatureColumn = ({
const x = styles.nfpLine.strokeWidth / 2 const x = styles.nfpLine.strokeWidth / 2
return ( return (
<Group> <Surface width={config.columnWidth} height={columnHeight}>
<ChartLine <ChartLine
path={new Path().lineTo(0, columnHeight)} path={new Path().lineTo(0, columnHeight)}
...@@ -49,7 +49,8 @@ const TemperatureColumn = ({ ...@@ -49,7 +49,8 @@ const TemperatureColumn = ({
leftTemperatureExclude={data.leftTemperatureExclude} leftTemperatureExclude={data.leftTemperatureExclude}
key='dotandline' key='dotandline'
/>} />}
</Group>
</Surface>
) )
} }
......
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