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

What is Framer? Join the Community
Return to index
Logan Merriam
Posted Apr 08 - Read on Facebook

I'm trying to make a scrollable layer snap to a nearby point when it slows. But I'm creating a bad loop because ScrollToPoint makes an animation that can go slower than the velocity threshold I'm watching for, and restarts the ScrollToPoint. There a way to turn the listener off while the ScrollToPoint is completing?


Josef Richter

Maybe Events.Move?

Logan Merriam

yeah, I'm not sure how to wait until the scrollToPoint is complete to turn it back on, though

Chris Camargo

you could probably re-bind the event after scrollToPoint has finished by using Events.ScrollAnimationDidEnd

Bogdan Lev

Sorry for offtopic. Is it possible to use framer.js code in real projects or compile it into js files?

Josef Richter

Bogdan framer.js is written in js (as .js in the name suggests), or coffeescript which is simply put just a js dialect. As such, you could potentially use it e.g. in a PhoneGap project (i.e. nothing prevents you from doing so), it is not intended and optimized for such use though.

Bogdan Lev

Thanks Josef!

Read the entire post on Facebook