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

What is Framer? Join the Community
Return to index
Steven Verhoest
Posted Aug 31 - Read on Facebook

hi everybody,

I have a question regarding changing multiple attributes of a layer.

First I created a layer in the standard way

layerA = new Layer
x:0
y:-90
name:"floatingMenu"

then I make a copy

layerB = LayerA.copy()

now if I want to change properties I need to change each one of them line by line

layerB.x = 100
layerB.y = 100
...

is there a short notation for this like you would the properties on a layer constructor?

thanks
Steven Verhoest

2 Comments

Andreas Wahlström

try layerB.props = {x: 100, y: 100}

Steven Verhoest

Andreas, I couldn't find it anywhere, you made my coding a bit faster and cleaner so thanks.

Read the entire post on Facebook