Prevent lingering crosshair when mouse leaves dygraph

pull/10616/head
Alex P 2018-06-27 16:46:06 -07:00
parent e13d001bde
commit d262281b9b
1 changed files with 5 additions and 1 deletions

View File

@ -244,7 +244,11 @@ class Dygraph extends Component<Props, State> {
const {staticLegend, cellID} = this.props const {staticLegend, cellID} = this.props
return ( return (
<div className="dygraph-child" onMouseMove={this.handleShowLegend}> <div
className="dygraph-child"
onMouseMove={this.handleShowLegend}
onMouseLeave={this.handleHideLegend}
>
{this.dygraph && ( {this.dygraph && (
<div className="dygraph-addons"> <div className="dygraph-addons">
{this.areAnnotationsVisible && ( {this.areAnnotationsVisible && (