Replies: 1 comment 5 replies
-
That seems not ideal, though it might be easier to have the conversation in the PR. What was the behavior before (MV v1.8)? Is there not a reasonable way to work around it? I ended up adding our |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
#2691 enables model rotation to be resumed after pinch-zooming, by lifting one touch.
A side effect of this is that a rotation interaction, followed by the addition of a second finger outside the model-viewer element triggers both model rotation and page zoom simultaneously. After lifting the finger outside the model-viewer, model rotation and viewport panning continue simultaneously
Personally, I'm not so fond of this behavior.
One way to change it is to use the
touch-action
CSS property.Consider a model-viewer with
camera-controls
enabled, zoom enabled (disable-zoom
disabled) and the model-viewertouch-action
property set topan-y
.For this configuration I have tried setting the CSS
touch-action
property to these two values which produce different behaviors:pan-y
(same as the model-viewer property)pan-y pinch-zoom
Do either of these two produce behavior which is considered more favorable than the current one?
Personally, I tend to lean towards
pan-y pinch-zoom
as it allows the page zoom to be manipulated as long as the finger on the model-viewer element is not moving.As a side note, MDN suggests that touch events are paired with the
touch-action
CSS property to explicitly indicate application intent before any event listeners have been invoked.Beta Was this translation helpful? Give feedback.
All reactions