Hey...is there any update on the snapToPage() bug in the Page Component? Or can someone at least guide me on a good way to hack around it? I'd really appreciate it : )
There was a post recently by JL Flores Mena that explained getting around a few of these issue... you should dig that up. I'm like almost 100% positive that a hack is mentioned in there.
Daniel, do you mean the issue where calling snapToPage() from a layer inside your PageComponent appears to prevent it from firing?
Here it is: https://www.facebook.com/groups/framerjs/permalink/713709805422760/
Thanks Jordan I scoured the group for anything related to this and I haven't found anything that solves my particular issue. Chris my issue is that when I have a page component and I dynamically add a page when say a button is clicked. I want the component to snap to that newly added page. The problem is that when I call snapToPage(newPg, true) it seems that it goes back to the first page before it scrolls and snaps to the new page. It becomes more noticeable when you have more pages.
I'm mobile right now but I'll share the code as soon as I have a chance to sit down. Appreciate your help gentlemen.
You might have to use a small delay... or use _.defer -> DoWork()
I bet you the new page isn't registered by the time you hit snapToPage?
I think so also but then again I logged the current page before the snap call and it seems right? All of this is new to me so I'm not well versed on how to debug. Prob doing something wrong. Trying to figure it out as I go along heh.
Here it is: http://share.framerjs.com/t1sy813xzzkc/ Thanks!
I'll try to take a look tomorrow if someone doesn't get to it before me. :)
Hey all, sorry for being late to this conversation. Jordan, thanks for sharing my previous post, but I think Daniel's issue here is a different one. Hey Daniel here's my fix with comments http://share.framerjs.com/jmnzi5epi7ld/I'd say that this wasn't a bug in the Page Component, the issue you had is that you weren't keeping track of the CurrentPage, so, Framer always thought you were on page 1, hence triggering that animation from 1 to newPage. Please let me know if this helps!
Awesome. Thank you!