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

What is Framer? Join the Community
Return to index
Angela Fan
Posted May 07 - Read on Facebook

Need help!

I am working with an imported layer in Photoshop (in this case, a bar graph) that I want to shift [x] pixels on Click. Because of how Photoshop export works, I have to expand the Photoshop canvas to the full width of the bar graph layer before export.

This leaves an extra space on the Framer canvas. I want to crop to the part outlined in red in the attached image.

I tried this line of code, but it doesn’t do anything:
PSD.x = -650

Any ideas or other solutions?

3 Comments

Gabriel Lovato

You should try:
- setting the red outline view's superLayer clip to 'true' and matching its width to the red outline view's width
- then, set the x of red outline view to -650.
BTW I don't think the "PSD" object has x/y properties like that.

Angela Fan

Thanks Gabriel Lovato, I found another solution after reading your comment.

Instead of doing the -650, I enclosed everything in a group, then masked the area I wanted to appear in Framer canvas. Doesn't matter if the mask is turned on or off when you export. Then I did: PSD.designCanvas.x = 0

Screenshot of the Photoshop setup for anyone with this problem.

Angela Fan

I did the masking solution because it also covers the case of the bar graph being longer than the "over" layer, if that makes sense.

Read the entire post on Facebook