Cleanup
parent
f6165b9e4b
commit
1540e8b8c7
|
@ -7,9 +7,9 @@ import AnnotationSpan from 'shared/components/AnnotationSpan'
|
|||
import * as schema from 'shared/schemas'
|
||||
|
||||
const Annotation = ({
|
||||
mode,
|
||||
dygraph,
|
||||
annotation,
|
||||
mode,
|
||||
lastUpdated,
|
||||
staticLegendHeight,
|
||||
}) => (
|
||||
|
|
|
@ -25,11 +25,12 @@ class Annotations extends Component {
|
|||
|
||||
componentDidMount() {
|
||||
this.props.dygraph.updateOptions({
|
||||
drawCallback: this.heartbeat,
|
||||
drawCallback: this.redraw,
|
||||
})
|
||||
}
|
||||
|
||||
heartbeat = () => {
|
||||
redraw = () => {
|
||||
// force a redraw of annotations
|
||||
this.setState({lastUpdated: Date.now()})
|
||||
}
|
||||
|
||||
|
@ -69,8 +70,8 @@ class Annotations extends Component {
|
|||
mode={mode}
|
||||
annotation={a}
|
||||
dygraph={dygraph}
|
||||
staticLegendHeight={staticLegendHeight}
|
||||
lastUpdated={lastUpdated}
|
||||
staticLegendHeight={staticLegendHeight}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue