pull/10616/head
Andrew Watkins 2018-04-09 20:20:51 -07:00
parent f6165b9e4b
commit 1540e8b8c7
2 changed files with 5 additions and 4 deletions

View File

@ -7,9 +7,9 @@ import AnnotationSpan from 'shared/components/AnnotationSpan'
import * as schema from 'shared/schemas'
const Annotation = ({
mode,
dygraph,
annotation,
mode,
lastUpdated,
staticLegendHeight,
}) => (

View File

@ -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>