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

What is Framer? Join the Community
Return to index
Camille Zapata
Posted Apr 07 - Read on Facebook

Hi everyone,

I'm trying to use "page.snapToPage()" with layers created through a for loop. I've assigned them names via "name: detail_#{pageIndex+1}".

However, "page.snapToPage(detail_1)" doesn't seem to work.

Appreciate any help. Thanks! :D


Michael Hu

Unfortunately, you can't reference a layer like that. You could run a loop of the children in page.content, then a conditional check for the name property to identify the correct layer to snap to.

Michael Hu

Alternatively, you can do a cheap hack to use a property's name as the index for page.content.children.

Read the entire post on Facebook