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

Removing cards using this.cards.shift() is causing issue on swipe effect on tapping like/dislike button #60

Open
gauravparmar opened this issue Jan 31, 2018 · 2 comments

Comments

@gauravparmar
Copy link

gauravparmar commented Jan 31, 2018

Removing cards using this.cards.shift() is causing issue on swipe effect on tapping like/dislike button.
I am loading 3 cards initially and then removing cards one by one on swiping using this.cards.shift() and also pushing a card on each removal using this.cards.push(....). Also instead of using cardCursor, I am always removing card at 0th index and adding one card at the end(Index 2) at the same time on swiping.
After using .shift() method, when we try to swipe the card then the swipe effect works but when we use like/dislike button then the swipe effect is not getting shown and the card is getting removed abruptly with no effect. What could be the possible reason?
And thanks a lot for such a nice module.

@Sjerd
Copy link

Sjerd commented Apr 17, 2018

Fire the like event on the card before shifting your stack: card.likeEvent.emit({ like });

@ravimail26
Copy link

what is card in the above line @Sjerd. Is it the viewchild of sc-card?

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

3 participants