Remove state from gauge
parent
fbb63f2702
commit
e71c8c7fb7
|
@ -9,10 +9,6 @@ import {
|
||||||
class Gauge extends Component {
|
class Gauge extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
||||||
this.state = {
|
|
||||||
gaugePosition: this.props.gaugePosition,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
@ -299,8 +295,7 @@ class Gauge extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
drawNeedle = (ctx, radius) => {
|
drawNeedle = (ctx, radius) => {
|
||||||
const {minValue, maxValue} = this.props
|
const {minValue, maxValue, gaugePosition} = this.props
|
||||||
const {gaugePosition} = this.state
|
|
||||||
const {degree} = GAUGE_SPECS
|
const {degree} = GAUGE_SPECS
|
||||||
const arcDistance = Math.PI * 1.5
|
const arcDistance = Math.PI * 1.5
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue