Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brush jumps to wrong position when changing selection with a handle #1804

Closed
jakubschenk opened this issue Feb 23, 2024 · 1 comment
Closed

Comments

@jakubschenk
Copy link

I was implementing an AreaGraph with a brush and noticed, that on touchpad (using a Macbook) when I move the selection a bit faster than unusual, the selection area is changed to a wrong position. This happens both in my implementation and in the example. I have no custom onChange handlers or onDragEnd handlers etc.

This is my code, basically just put my data into the example on site.
<Brush xScale={xScale} yScale={yScale} width={xMax} height={yMax} margin={AREA_CHART_MARGIN} handleSize={8} innerRef={brushRef} resizeTriggerAreas={['left', 'right']} brushDirection="horizontal" onMouseMove={handleTooltip} onMouseLeave={() => hideTooltip()} selectedBoxStyle={selectedBrushStyle} useWindowMoveEvents renderBrushHandle={(props) => <BrushHandle {...props} />} />

Videos of the issue to understand it better:

Screen.Recording.2024-02-23.at.16.55.52.mov
Screen.Recording.2024-02-23.at.16.56.49.mov
@jakubschenk jakubschenk changed the title Brush jumps to a wrong position when changing it's width a handle Brush jumps to a wrong position when changing it's width with a handle Feb 23, 2024
@jakubschenk jakubschenk changed the title Brush jumps to a wrong position when changing it's width with a handle Brush jumps to a wrong position when changing selection with a handle Feb 23, 2024
@jakubschenk jakubschenk changed the title Brush jumps to a wrong position when changing selection with a handle Brush jumps to wrong position when changing selection with a handle Feb 23, 2024
@hshoff
Copy link
Member

hshoff commented May 24, 2024

Fixed in #1836. Released in @visx/brush@3.10.4

@hshoff hshoff closed this as completed May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants