Add option for "dead space"
See original GitHub issueI am using both react-swipeable-views
and react-sidebar
in a project. There is an issue where swiping open the sidebar also swipes the views. I am not sure what the best solution would be in this case, but I was thinking it would be nice with there was an option for left, right, top, and bottom “dead space” in react-swipeable-views
. This way react-sidebar
’s touch would occupy the disabled space the two wouldn’t interfere.
I am open for suggestions if there is a better way of going about this. Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Dead Space - PCGamingWiki PCGW - bugs, fixes, crashes ...
Download and install Widescreen Fixer. · Run the program · Select the 'Main' tab, and select 'Dead Space' from the dropdown menu ·...
Read more >Dead Space 3 - PC Graphics Settings and Options ... - YouTube
Subscribe: http://bit.ly/NEZWwUThanks for every time you "LIKE" a video. It really helps my channel to grow! Thanks so much!
Read more >Dead Space™ – EA Official Site
The sci-fi survival horror classic Dead Space™ returns January 27, 2023, completely rebuilt to offer an even more immersive experience – including visual, ......
Read more >How to add or replace a subtitle in dead space 1 ? | Fandom
Hi all. I want to translate Dead space but i need to extract the subtitle from the game and add mine. anyone know...
Read more >dead-space-3-manuals_PC.pdf - Akamaihd.net
Press E to add the revealed item to your inventory. Press I to open the inventory display and view your items, consume Med...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Met the same problem: react-swipeable-views + react-slider.
Because these two libs all need to ensure keep on swiping/sliding while user’s finger/mouse left target element, so they all used
document.addEventListener('touchmove', handler)
rather thanonTouchMove
.Attemping to stop bubbling between swipeable view and slider will break both of them.
My solution was forking react-slider and modify the add event method with
useCapture: true
:This will ensure the slider could receive touch events.
Then create a ‘DeadSpace’ component to stop bubbling events:
And use it to wrap slider like this:
Was someone able to figure this out? I’m trying to also make some ‘dead space’ within a SwipeableViews component because I’m adding a MaterialUI slider (and dragging the slider causes the whole view to be swiped instead).
This is what I have:
A level above it, I have the SwipeableViews, so I want to be able to move the slider without moving the swipeable views. I added this according to @oliviertassinari 's suggestion in
componentDidMount
:which does disable the swipeable views but it also disables the slider… (of course since it’s not propagating the events to the slider now)
Any ideas?