guanzo / vue-smooth-reflow

Transition an elements reflow when the data changes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BeforeTransition hook to control options dynamically

FransTwisk opened this issue · comments

I'm using this mixin in a global layout animating the content between route changes and such and it works very well for this. However, sometimes the difference in height between one route and the next is a lot, causing a weird (long) animation.

It would be great if there was a beforeTransition hook where start and end properties are available (in this case height before and after) and a way to dynamically change the options in that hook for that run.

For instance, if the difference in height would be more then a certain amount, we disable the transition for that particular run. I'm sure this will also be useful for a lot of other use cases!

I've created a (simple) merge request for this. #19