Make code more readable
parent
31d3374417
commit
97b7048c25
|
@ -16,9 +16,9 @@ class NewAnnotation extends Component {
|
||||||
|
|
||||||
enforceGraphBounds = newTime => {
|
enforceGraphBounds = newTime => {
|
||||||
const {dygraph} = this.props
|
const {dygraph} = this.props
|
||||||
const xRangeStart = dygraph.xAxisRange()[0]
|
const [xStart] = dygraph.xAxisRange()
|
||||||
|
|
||||||
return newTime < xRangeStart ? `${xRangeStart}` : `${newTime}`
|
return newTime < xStart ? `${xStart}` : `${newTime}`
|
||||||
}
|
}
|
||||||
|
|
||||||
handleMouseDown = e => {
|
handleMouseDown = e => {
|
||||||
|
|
Loading…
Reference in New Issue