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

What is Framer? Join the Community
Return to index
Don Behm
Posted Jan 20 - Read on Facebook

I'm trying to use a variable as a property in an Animation. I set the initial value and the ani object gets the value but when i run the animation again with a new value for my var it doesn't update. Thoughts?

8 Comments

Marc Krenn

Can you share your file with us? :)

Don Behm

I cannot because its for work, but I can show the code. I set the tabContentPanelHeight ahead of this and change the var on a click event and then also trigger this animation on the came click

Marc Krenn

Just wrap the assignment of 'tabContentPanelHeight' in a function that gets fired when tabContentPanel gets moved and/or resized:

tabContent.Panel.on "change:frame",->
_____tabContentPanelHeight = foo * bar + whatev

Don Behm

ok i'll try it!

Don Behm

ok i am still working on it but i took the prob out of my project for sharing

Don Behm

each TAB should animate the content panel to a different height

Don Behm

Oh sweet - you were right - I wrapped it in a function and it worked! Thank you!

Read the entire post on Facebook