This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Katie Wu
Posted Jul 28 - Read on Facebook

How could I simulation a more iPhone specific interaction, like pinch in to zoom outward? Like if you're looking at a photo on iPhone and then you pinch, it'll reveal the photo's place in the larger grid of photos.

4 Comments

Stephen Crowley

Hi Katie- if you search in the group for Hammer.JS you can see integration of it with Framer. There are also posts w/ examples.

Joshua Tucker

Hey Katie, echo Stephen Crowley – HammerJS is an option. However, another option is to look into the TouchEvent property.

https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent

The TouchEvent property contains a property called touches, which stores info about each TouchEvent that fires/firing (such as x, y coordinates, etc), including the number of TouchEvents i.e. number of fingers on screen. You can put some logic together to judge distance and what not to get what you want.

I'm currently building a module that extends Framer Events to include multitouch events, for instance, Event.Pinch. I'd be happy to answer any questions you have about TouchEvent logic as I have been dabbling with it for the last few days.

Katie Wu

Thanks guys! I'll check it out!

Stephen Crowley

Sorry Joshua Tucker I flaked :)

Read the entire post on Facebook