Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Missing .reverse() in the motion.dev/dom docs #199

Open
Jelmerovereem opened this issue Jun 23, 2023 · 1 comment
Open

Missing .reverse() in the motion.dev/dom docs #199

Jelmerovereem opened this issue Jun 23, 2023 · 1 comment

Comments

@Jelmerovereem
Copy link

The .reverse() method is not documented in the docs.

But it's typed here: https://github.com/motiondivision/motionone/blob/d1e80e79b00779a8319c015929f7d8f4fba7612d/packages/types/src/index.ts#L39C5-L39C5

Suggestion:

reverse()
Reverses the animation.

const animation = animate(element, { opacity: 0 })

animation.reverse()
@Acccent
Copy link

Acccent commented Aug 27, 2023

If this gets documented maybe it should be a little more specific? Adding that it simply inverts the playback rate, without playing the animation if it's currently at the end; or explaining that calling reverse on an already reversed animation will play it forwards. (Maybe the implementation will be tweaked to account for these details and that's why it isn't documented...?)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants