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

What is Framer? Join the Community
Return to index
Jason Nelson
Posted Apr 21 - Read on Facebook

Quick question. Having issues scaling layers. When I have a sublayer that's dimensions differ from its super layer, the sub layer doesn't scale. Example:

container = new Layer ({x:0, y:0, width: 320, height: 480, backgroundColor:"blue"})

header = new Layer ({x:0, y:0, width: 320, height: 240, backgroundColor:"orange"})
container.addSubLayer(header)

container.scale = 2

In this example, the width of the sub layer is scaling with the super layer but the height is not.

Thoughts? Is this a bug?

2 Comments

Fabian Schultz

It does scale, but outside of the screen. If you set container.originY (and originX) to 0 it'll scale properly.

Jason Nelson

That worked! Thanks, Fabian!

Read the entire post on Facebook