-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some cards in the hand won't flip #6
Comments
It also happens when the animation is disabled. So it's time to blame my obscure ngOnChanges(changes: SimpleChanges) {
if (changes.value && !changes.value.firstChange && this.animateFlip) {
this.flipAnimationSubject.next('back');
setTimeout(() => {
this.flipAnimationSubject.next(this.flipState);
}, 0);
}
if (changes.revealed) {
this.flipAnimationSubject.next(this.flipState);
}
} |
It only happens when you drag the SKip-Bo wildcard into a pile. A pile converts the Skip-Bo card into the logical card value that would follow the current top card of the pile. Example: If the pile is empty it would be transformed into a 1, is there a 5 a 6 would follow etc. Together with the CDK Drag & Drop — where the real components are moved into other receiving components we have now a problem whenever we drag a Skip-Bo card into a pile. The card face gets transformed and this somehow breaks the animation flip. That's a good starting point and a fix should be possible — either with a CDK Drag & Drop setting or by looking into the Flipcard Animation. My assumption: (If you remove the hand animation trigger there is no visible bug) but also no animation. |
Here the minimal reproduction of the bug: Source to edit: https://stackblitz.com/edit/skipbo-bug-flip
I can perfectly recreate the problem, it's like the animation engine wrongly identifies an item being destroyed while it's clearly not. I will tinker around with the minimal demonstration and if I can't get any other insights I will file a bug. |
I filed an issue in the angular tracker — let's see |
There's a bug introduced with the flip animation. It seems that the hand animation that orchestrates the the child animations (on each card) is not recognizing a changed card.
I think it's a problem here.
The text was updated successfully, but these errors were encountered: