Closed joepagan closed 4 years ago
Ever seen this @desandro or have any suggestions on things to look for?
Hello! Sorry to hear you're having trouble with Flickity. I have the same suspicion - that there is some behavior within the Angular app that is overwriting Flickity's behavior. Angular modifies the DOM. So does Flickity. So you'll need to add extra logic so that Flickity's animation can occur without Angular immediately setting the position. I leave that up to you!
Just letting you know I have figured out my issue...
I was calling the resize()
function inside an unsuitable condition on the AfterViewChecked
lifetime event hook (which fires like 3 times whenever a change is made), makes the behavior make complete sense now!
I have tried to replicated this with a test case: https://stackblitz.com/edit/angular-flickity-create-destroy but in this case my test case works!
I know it's unlikely you can help without a broken test case, but, I've struggled to find any related issue on the matter and not sure how to proceed, maybe this issue has been highlighted elsewhere and I have not found it.
When viewing a working example's DOM, it shows that the translate3d css params update smoothly:
However, in my example,
translate3d
never seems to be applied and it just jumps to each slide withtranslateX
:It is as if it has been debounced/throttled somehow.
For some context, this issue is occurring inside an angular app (which I cannot share unfortunately), quite new to angular, though implementing it in a very similar way to the test case.
Slight work around seems to be setting the following, but would rather not have to do this: