mirror of
https://github.com/jlfwong/speedscope.git
synced 2024-11-22 22:14:25 +03:00
Hide hovertip on mouseleave
This commit is contained in:
parent
0644f16814
commit
17df504205
@ -16,7 +16,6 @@ export const style = StyleSheet.create({
|
||||
background: 'white',
|
||||
border: '1px solid black',
|
||||
maxWidth: Sizes.TOOLTIP_WIDTH_MAX,
|
||||
overflow: 'hidden',
|
||||
paddingTop: HOVERTIP_PADDING,
|
||||
paddingBottom: HOVERTIP_PADDING,
|
||||
pointerEvents: 'none',
|
||||
@ -27,7 +26,7 @@ export const style = StyleSheet.create({
|
||||
hoverTipRow: {
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'nowrap',
|
||||
overflow: 'hidden',
|
||||
overflowX: 'hidden',
|
||||
paddingLeft: HOVERTIP_PADDING,
|
||||
paddingRight: HOVERTIP_PADDING,
|
||||
maxWidth: Sizes.TOOLTIP_WIDTH_MAX,
|
||||
|
@ -458,6 +458,11 @@ export class FlamechartPanZoomView extends ReloadableComponent<FlamechartPanZoom
|
||||
this.renderCanvas()
|
||||
}
|
||||
|
||||
private onMouseLeave = (ev: MouseEvent) => {
|
||||
this.props.setNodeHover(null, new Vec2())
|
||||
this.renderCanvas()
|
||||
}
|
||||
|
||||
private onWheel = (ev: WheelEvent) => {
|
||||
ev.preventDefault()
|
||||
this.frameHadWheelEvent = true
|
||||
@ -513,6 +518,7 @@ export class FlamechartPanZoomView extends ReloadableComponent<FlamechartPanZoom
|
||||
className={css(style.panZoomView, style.vbox)}
|
||||
onMouseDown={this.onMouseDown}
|
||||
onMouseMove={this.onMouseMove}
|
||||
onMouseLeave={this.onMouseLeave}
|
||||
onWheel={this.onWheel}>
|
||||
<canvas
|
||||
width={1} height={1}
|
||||
|
Loading…
Reference in New Issue
Block a user