Hello lovely Framer people!
I'm having some slight trouble with input spam breaking my animations.
Is there a clean, succinct way to limit input to only trigger an event when no animations are taking place?
sure, theres a bunch of ways to accomplish this... could you share a little more detail on your prototype?
Sure, I have an event listener on the arrow keys. Something akin to this, http://pastebin.com/BM8gCFqR
I considered using Utils.delay to last the same amount of time as the animation but it doesn't seem like a very nice way to solve the problem
check out Utils.throttle in the docs :)
You could also check if the layer is already animating. Here you have two layer switching states on click but only one at a time: http://share.framerjs.com/fncgbugkkhme/
Perfect! Thank you so much! I'll examine the docs a little closer in future :D
Thanks Jonas, that's pretty handy too! I knew about this function and had a feeling that if I used it for every animation it would get a bit heavy. I think the throttling solves a lot of the problems because I'm using a lot of keyboard input.
PS. I <3 FRAMER