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

What is Framer? Join the Community
Return to index
Ryan Gambles
Posted Sep 12 - Read on Facebook

This may be more of a coffeescript question, but here goes. I'm attempting to extend PageComponent to make a proper version of my looping page component behaviour.

My simple start was just to do this:
class exports.LoopingPageComponent extends Layer
constructor: (options={}) ->
super options

loopedPages = new LoopingPageComponent()

However, if I then attempt to manipulate any of the properties of an instance (ie. loopedPages.visible = false) I end up getting an error:
'undefined is not an object (evaluating 'baseType.dynamic')

Wha happened?


Ryan Gambles

Nm. I was instantiating the LoopingPageComponent constructor on an object: loopCompontents.loopingPages = new LoopingPageComponent()

For some reason, that works fine for a vanilla PageComponent but not for my LoopingPageComponent. Guess that's a weird coffee script bug.

Eli Beitzuri

Hey, did you ever create this looping page component? It would come in pretty handy at the moment.

Ryan Gambles

I didn't solve it with the Page Component object, but it was suuuuuper easy to setup with Chris Camargo's View Navigation Controller for framer:

Basically, put a bunch of views into an array, and then just loop through the array with the same view transition. Works like a charm.

Read the entire post on Facebook