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

What is Framer? Join the Community
Return to index
Slava Ustinov
Posted Sep 26 - Read on Facebook

Hi. Please tell me how should i do scroll if i will import psd. My psd height more then viewport, so i added it to superlayer.
superLayer = ScrollComponent.wrap(psd.scroll) but this scroll firing when i drag another elements. And another question. How can i duplicate psd layer?

This is my project - http://share.framerjs.com/7y3yep8j5wlb/ last item and large item is draggable.

2 Comments

Benjamin Den Boer

Hiya Slava Ustinov, let's see.

1. Ah, this is a nested scrolling issue. To fix the draggable layer also influencing your scrollable content, add this property to your draggable layers:

psd.group_1.draggable.propagateEvents = false
(also for 2, 3 and your vacancy layer).

2. Using two importer objects is not recommended — you can copy individual layers by using the layerA.copy() method though:

layerB = layerA.copy()

Benjamin Den Boer

Hiya Slava Ustinov, glad to hear that it worked. I see. Well, copy() copies the properties, but not the hierarchy. So you'll need to define the same parent layer manually. This is likely what makes it appear visually distinct.

Another way to go about this (with less code) is by using arrays. You can generate cards in code, and add the animation once within the loop, which all layers will then inherit. Check out our little write-up on Loops here → https://framerjs.com/getstarted/programming/#loops-and-arrays

Read the entire post on Facebook