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

Strange behavior on drag cards when fetch a list of "cards" asynchronous #47

Open
joaom182 opened this issue Jan 25, 2015 · 11 comments
Open

Comments

@joaom182
Copy link

When i start drag the card, he moves to the center.

Code Pen - http://codepen.io/anon/pen/dPRdPj

The only difference between in the example above and the original example, is a "timeout" simulating a call asynchronous to populate the list of cards.

@keithdmoore
Copy link
Contributor

I am seeing the same behavior if the cards are loading in a different view and then you select the view with the cards. Not sure what the problem is. @mlynch can you talk a look at this?

@joshteng
Copy link

I am having the same issue when I do something like this $scope.cards = Card.query();. Anyone has any suggested temporarily work around?

@joaom182
Copy link
Author

My work arround is based on ng-if.

Involves the element <td-cards> with a <ng-if> and only set to true to appear when your data is fully loaded.

@keithdmoore
Copy link
Contributor

Can you elaborate as to what that looks like? Post some code?

@joaom182
Copy link
Author

Follow the CodePen sample: http://codepen.io/anon/pen/LEjYeY

@joaom182
Copy link
Author

Any updates on this issue? Was anyone able to get it working?

@albertoalcaraz
Copy link

I'm having the same issues. It seems that your work around ends up with the same glitches...

Did you found anything else?

@joshteng
Copy link

I temporarily work around it by showing only one card at a time, keeping track of other 'card data' in another variable and adding a card to queue every time a card is swiped. And when the other queue reaches a certain threshold, I'll asynchronously retrieve more 'cards' from my server. The only downside is there isn't some sort of a 'shadow' of having multiple cards underneath. But I suppose that could be solve using some graphic/CSS. There is also minimal lag for the next card to show up.

@albertoalcaraz
Copy link

You mean having two cards in the collection? One to swipe and one underneath?

@albertoalcaraz
Copy link

I think this issue happens when you swipe two cards fast, not letting the animation to put the new card on the front to finish. If you swipe slow it seems to work always.

Anyone can confirm?

@albertoalcaraz
Copy link

Ok, in my case I didn't have a proper on-destroyed handler, and it's seems that is needed. Now have some glitches but a lot fewer...

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

4 participants