Commit 6004c4be authored by Justin Domingue's avatar Justin Domingue Committed by GitHub

fix: change panning cursor to col-resize (#2071)

* change panning cursor to col-resize

* revert to grabby, and support grabbing
parent a00432c1
......@@ -5,7 +5,7 @@ import { AxisBottom } from './AxisBottom'
import { Brush } from './Brush'
import { Line } from './Line'
import { ChartEntry, LiquidityChartRangeInputProps } from './types'
import Zoom from './Zoom'
import Zoom, { ZoomOverlay } from './Zoom'
export const xAccessor = (d: ChartEntry) => d.price0
export const yAccessor = (d: ChartEntry) => d.activeLiquidity
......@@ -117,7 +117,7 @@ export function Chart({
<AxisBottom xScale={xScale} innerHeight={innerHeight} />
</g>
<rect width={innerWidth} height={height} fill="transparent" ref={zoomRef} cursor="grab" />
<ZoomOverlay width={innerWidth} height={height} ref={zoomRef} />
<Brush
id={id}
......
......@@ -26,6 +26,15 @@ const Button = styled(ButtonGray)`
padding: 4px;
`
export const ZoomOverlay = styled.rect`
fill: transparent;
cursor: grab;
&:active {
cursor: grabbing;
}
`
export default function Zoom({
svg,
xScale,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment