Pinch to zoom on mobile devices does not work under some conditions

I make some digital brochures with Saola Animate so it is very useful that the pinch-to-zoom function is working to zoom some parts… And that’s the problem.
I noticed that if a trigger is applied on a scene (ex: go to the next scene when the user swipes left) the pinch to zoom doesn’t work.
Probably the listener in saola player that captures thise kind of events blocks the gesture.
Note: Obviously this is not a problem related to the “viewport” meta tag, in fact the gesture works on pages without actions.

I’ve created an online example to test this behavior (of course you have to test it on a mobile device).
https://fluz.it/pinchsample/

Any solution?

Hi,

You can use scripts as a solution for your case. Here’s how:

  • Open the Scene Event Handlers dialog > select the Scene Activate event > Add Action button > Other Actions > Run JavaScript.

  • Select Add Function > enter the scripts below:


function onSceneActivated(doc, e) {
  this.dom.style.touchAction = 'pinch-zoom';
}

Best regards,
Thuy

Great job master!
Thanks for the very fast reply. I’m still an enthusiast Saola Animate user!

I made a small change that I hope will be useful for other users.
I’ve applied the function at the document level so I don’t need to call it in every scene.
To do this I simply added a function to the Document Event Handlers > Scene Activate

function activateZoom(doc, e) {
  	doc.getScene().dom.style.touchAction = 'pinch-zoom';
}

1 Like

Hi @fluz,

Thank you for your great suggestion :blush:
Hope you have many amazing experiences with Saola Animate.
And don’t hesitate to reach out to us if you have any questions. We’re always here to help!

Nice day,

How is everyone and Atomi going to keep using this old hat, when we now have Sora and that is just the beginning? where on single parapraph or even a phrase of natural language can make a movie like Disney Pixar, and write the screenplay and create the characters for you, on one prompt?

Text to Video Kills Content Creation Services and makes Hollywood Quality Moviemaking Public Domain

We really don’t need this anymore.

How i Made a Tic-Tac-Toe app in a few minutes in ChatGPT (could be a tutorial or questionairre too like in Active Presenter - OBM is dead, AI is born)
P.S. I am still on my overpriced Active Presenter V8.0 as im not paying hundreds of bucks to upgrade for a few extra silly features and assets every month or year after you have an upgrade, and put up with upgrade prompts that my paid version wont allow! NO WAY Greedy Chinese DEVs