Visx: Brush interaction not working on mobile

Created on 6 Oct 2020  路  3Comments  路  Source: airbnb/visx

(Enjoying the library, thanks for making it available)

I noticed the brush doesn't work with touch interactivity on mobile. Example here: https://vx-demo.now.sh/brush

After digging into the code a bit, I noticed that mobile events don't seem to be wired up for the Drag component. Shouldn't drag include touch and touchmove the same way as mouse and mousemove?

https://github.com/airbnb/visx/blob/master/packages/visx-drag/src/Drag.tsx#L121-L122

I could give it a shot if this is unintended and no one has time to look into it or is currently doing so. Lmk

@visbrush @visdrag 馃悰bug 馃憢help wanted

Most helpful comment

@BrianRosamilia did you make any progress with this? also came here because I noticed that the brush is broken on mobile :/

edit: Sorry totally missed your pull request 馃う ... anyway, is there a chance that this gets a review (and merge) soon?

All 3 comments

Hey @BrianRosamilia thanks for the bug report 馃檹 I think this is simply an oversight with @visx/drag, it should support the touch events as you noted.

Would happily review a PR if you want to take a shot!

@williaster

Can you (or someone) help me build the brush and its dependencies?

Interestingly, the build for the brush points at the lib folder of @visx/drag and not at drag directly, which I'm noticing almost no other components do--so the instructions for building/debugging a single component don't actually work, as I see it :( I can work on the brush by following the instructions, but when I try to modify drag it doesn't work.

https://github.com/airbnb/visx/blob/master/packages/visx-brush/src/BaseBrush.tsx#L4

Feel free to just show me a bash script to build brush & its dependencies properly, I'm guessing this has been solved before!

Edit: you can just use yarn build to avoid this but it builds all of the components

@BrianRosamilia did you make any progress with this? also came here because I noticed that the brush is broken on mobile :/

edit: Sorry totally missed your pull request 馃う ... anyway, is there a chance that this gets a review (and merge) soon?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sabarnix picture sabarnix  路  4Comments

DarKDinDoN picture DarKDinDoN  路  4Comments

esetnik picture esetnik  路  3Comments

danielprogramic picture danielprogramic  路  3Comments

goaaron picture goaaron  路  3Comments