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' import * as schema from 'shared/schemas'
const Annotation = ({ const Annotation = ({
mode,
dygraph, dygraph,
annotation, annotation,
mode,
lastUpdated, lastUpdated,
staticLegendHeight, staticLegendHeight,
}) => ( }) => (

View File

@ -25,11 +25,12 @@ class Annotations extends Component {
componentDidMount() { componentDidMount() {
this.props.dygraph.updateOptions({ this.props.dygraph.updateOptions({
drawCallback: this.heartbeat, drawCallback: this.redraw,
}) })
} }
heartbeat = () => { redraw = () => {
// force a redraw of annotations
this.setState({lastUpdated: Date.now()}) this.setState({lastUpdated: Date.now()})
} }
@ -69,8 +70,8 @@ class Annotations extends Component {
mode={mode} mode={mode}
annotation={a} annotation={a}
dygraph={dygraph} dygraph={dygraph}
staticLegendHeight={staticLegendHeight}
lastUpdated={lastUpdated} lastUpdated={lastUpdated}
staticLegendHeight={staticLegendHeight}
/> />
))} ))}
</div> </div>