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

What is Framer? Join the Community
Return to index
Lut Ze
Posted Feb 10 - Read on Facebook

another question: is there a simple way to prevent an image sublayer to scale, when scaling its parent layer?

6 Comments

Marcelo Eduardo Oliveira

Lut Ze not a simple way (at least not that I' know of) What you can do is to create a function for the scaling, that removes the sublayer, scales, then put it back in ) of course the issue is: you have to put the sublayer in the perfect position while removing from it's parent

Lut Ze

yeah, that would be a nice feature to add though. right now im scaling the sublayer with the inverse of the scale factor which scaled the parent layer.

Jordan Robert Dobson

You can have an event listen for a scale change on the parent. And when that's fired also do the inverse on the child.

Jordan Robert Dobson

It's not documented I don't think. When I get it my desk I'll get you that event handler.

Jordan Robert Dobson

parent.on "change:scale", => child.scale... etc

Jordan Robert Dobson

I hope that helps.

Read the entire post on Facebook