Hi everyone, I'm new to Framer and so far like the concept very much. I just wanted to experiment with Scroll Views but can't get them running.
As soon as I create a ScrollComponent I get the error message "wrapComponentScrollComponent.coffee:404TypeError: undefined is not an object (evaluating 'layer.subLayers')".
Can someone help me?
This is the Sketch file. Nothing special.
Hey Lennart Brandt can you share your file so we can help you out? Just click the share button in the top right hand corner and paste the link it generates here
What happens when you:
Thank you all for the fast replies. Here's the file: http://share.framerjs.com/9ef3aucgs370/ Andrew Nalband
Ok, Lennart Brandt a few things here.
First thing - "content" in the "wrap" section of the docs is an example that assumes you have a sketch layer named "content". For your example, your layer is called "scrollExample" so you want to use a line like this:
scroll = ScrollComponent.wrap sketch.scrollExample
Jorn van Dijk - heads up - using an example called "content" here might be confusing for folks, since a ScrollComponent has a "content" property.
Second thing - When you import from Sketch, anything outside of an artboard will actually get cropped. See this example to see how the extra boxes in your sketch file have been cropped:
In order to fix this, you want to structure your sketch file's artboard to be taller than an iPhone screen. Like so:
Lennart Brandt - you probably also want to disable horizontal scrolling to get this working how you'd expect. Here is an example that disables horizontal scrolling and uses the larger artboard from my example above: http://share.framerjs.com/pz46p7tbh7me/
Lennart Brandt here's an example of how to arrive at the same result without using sketch at all. I've added some comments here to explain what's going on. Let me know if you have any questions about this. http://share.framerjs.com/bgkkqe784vg3/