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
🔮 v8.0.0 beta available #180
Comments
This comment has been minimized.
This comment has been minimized.
Try to comment out the line 60:
On my Android it works perfectly then. Please, let us know if it helps. |
This comment has been minimized.
This comment has been minimized.
Please, record the same interactions with the following app: https://patrickhlauke.github.io/touch/tracker/multi-touch-tracker-pointer-hud.html |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@n1ru4l I'm on my phone atm but have a look at https://codesandbox.io/embed/old-shadow-uq7mt?codemirror=1. The inner orange square drag doesn't propagate to its parent. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hi @n1ru4l is it possible to provide a repro sandbox? I'll try to have a look over the week-end. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@n1ru4l indeed you're right! I'll check about removing undefined, but |
Now |
This comment has been minimized.
This comment has been minimized.
@dbismut Could it be possible that there is no longer a EDIT: I noticed that the Also is it possible that
|
@n1ru4l yes Regarding the |
This comment has been minimized.
This comment has been minimized.
@n1ru4l I should have been clearer sorry. You're probably zooming with Safari. But pinching also supports zooming with more standard trackpads, using the wheel while pressing the ctrl key. In that case, no origin 🤷♂️ you can try with Chrome. Regarding the typing issue with r3f, the user should be responsible for which event it expects from the handler, I think casting should be a better solution. I'll try to work on sth when I have time. |
This comment has been minimized.
This comment has been minimized.
You're right, I should add this to the doc :) I'll see about mouse coordinates as default. |
Hey @n1ru4l type of origin is now defined in Regarding casting events to Three, have a look at this: #182 (comment) Hope that helps ;) |
It seems like a new alpha is released but the code is not pushed on github yet 😅 (v8.0.0-alpha.9) |
v8 is now released |
Hi all,
React Use Gesture v8.0.0 is now available on npm with the
next
tag. You can install it by typing the following command:⚡️Please test this version on your app and report any breaking behavior! ⚡️
Internal changes
v8.0.0
is a major rework and refactoring of the code aiming at better structure and performance improvements across renders, thanks to @thephoenixofthevoid.Breaking changes
Pointers (could be controversial)
The library now resorts to pointer events extensively: this simplifies some of the drag logic significantly, but has two main implications:
The
{ eventOptions: { pointer: true } }
option is now gone. This means that react-use-gesture works out of the box with react-three-fiber 💁♂️Because scrolling cancels pointer events on touch screens, you will need to style your element with
touch-action: <value>
to make sure the dragging can work properly. The docs for touch-action.domTarget option no longer requires useEffect in user land.
When adding events directly to the dom element using
domTarget
you no longer need to clean the effect yourself.Non intentional movements will always fire your handler
This aims at working with the
threshold / filterTaps
option.In React Use Gesture v7, if you had set the drag
threshold
option to10
, youruseDrag
handler would only fire when thex
ory
displacement of the user gesture would be greater than10
. This is no longer the case in v8. Your handler will fire as soon as the drag is initiated.This means that if you have some complex logic in your handler, you may want to wrap it into like so:
This changes makes it easy to access initial
pointerdown
and subsequentpointermove
events in userland, and possiblystopPropagation
orpreventDefault
.Added features
v8.0.0 doesn't add many features but:
{ filterTaps: true }
will also prevent unwanted taps on children elements #173.Remaining to be done
active
when used withfilterTaps
,threshold
, etc.Happy testing 🕹
The text was updated successfully, but these errors were encountered: