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

What is Framer? Join the Community
Return to index
Yi Hao
Posted Apr 26 - Read on Facebook

Hi there, I have a question about this prototype on Framer site:
https://share.framerjs.com/g0csfrca75ko/

On Line 36:
point = Utils.convertPointFromContext(event.touchCenter, zoom, true, false)

I know what's utils means, but I don't know and cannot find convertPointFromContext on framer docs.
Anyone can tell me what's this line means? Thanks!

2 Comments

Floris Verloop

This function is used to convert a point (x, y) from one context to another. In this case, when you pinch, the event returns the point relative to the zoom layer. Then, the "convertPointFromContext" function is used to get the point that's relative to the screen context, which is basically the absolute position on the screen.

Read the entire post on Facebook