diff --git a/ui/src/shared/components/Crosshair.js b/ui/src/shared/components/Crosshair.js deleted file mode 100644 index fafd3cac18..0000000000 --- a/ui/src/shared/components/Crosshair.js +++ /dev/null @@ -1,58 +0,0 @@ -import React, {Component} from 'react' -import PropTypes from 'prop-types' -import classnames from 'classnames' - -import {DYGRAPH_CONTAINER_XLABEL_MARGIN} from 'shared/constants' -import {NULL_HOVER_TIME} from 'shared/constants/tableGraph' -import {ErrorHandling} from 'src/shared/decorators/errors' - -@ErrorHandling -class Crosshair extends Component { - shouldComponentUpdate(nextProps) { - return this.props.hoverTime !== nextProps.hoverTime - } - - render() { - return ( -
-
-
- ) - } - - get crosshairLeft() { - const {dygraph, hoverTime} = this.props - - return Math.round( - Math.max(-1000, dygraph.toDomXCoord(hoverTime)) || -1000 + 1 - ) - } - - get crosshairHeight() { - return `calc(100% - ${this.props.staticLegendHeight + - DYGRAPH_CONTAINER_XLABEL_MARGIN}px)` - } - - get isHidden() { - return this.props.hoverTime === NULL_HOVER_TIME - } -} - -const {number, shape, string} = PropTypes - -Crosshair.propTypes = { - dygraph: shape({}), - staticLegendHeight: number, - hoverTime: string, -} - -export default Crosshair