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 - last item and large item is draggable.


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 →

Read the entire post on Facebook