-
Notifications
You must be signed in to change notification settings - Fork 716
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
feat(brush): disable drag overlay #1744
Conversation
Hi @williaster 👋 Can you take a look at it when you have some time? 😄 |
Hi @Onxi95 👋 thanks for the ping, sorry this slipped through. It looks like CI hasn't run for the PR, can you try to rebase just to re-trigger things? I'll try to take a look at it ASAP, it may be next week due to the holiday this week |
b32d634
to
e967322
Compare
Hello @williaster 👋 I was looking around, trying to see what's going on with actions, but at the end I saw that I guess it's needed to trigger actions and I think I don't have permissions to do it 😅 Launched the jobs from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your patience here @Onxi95 🙏 this lgtm, thank you for the contribution!
🎉 This PR is included in version |
Hi! Thank you for this wonderful library - without you I would probably cry in the corner thinking how to implement fancy charts 😅
🚀 Enhancements
disableDraggingOverlay
toBrush
in order to be able to useBrush
only as a scroll (without possibility of changing its size)🤔 Motivation
I was building something similar to bar chart. The requirements changed a bit (ofc 😅) and the chart has to have multiple columns with minimum width and scrollbar if needed. The closest solution to achieve this result is
Brush
(It doesn't handle scroll events, but manual scroll using mouse is good enough for our use-case).I styled the brush to look like a standard, gray scrollbar, but when I click outside of it, new area of brush is created. There's
disableDraggingSelection
prop, but it affects scrollbar, and there's no option to do something similar but to overlay. I managed to work around it by usingpointer-events: none
, but I think it's a bit hacky solution and making it available in the lib might be beneficial :D🧪 How to test it?
in brush example (
packages/visx-demo/src/sandboxes/visx-brush/Example.tsx
), adjust<Brush />
component like:brush.mp4