Skip to content
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

Last card keeps getting larger and larger #1

Open
thomastthai opened this issue Jan 4, 2016 · 2 comments
Open

Last card keeps getting larger and larger #1

thomastthai opened this issue Jan 4, 2016 · 2 comments

Comments

@thomastthai
Copy link

Thank you for the demo. The first card flies off fine. Each of the follow discard click doesn't move pass the Germany card.. It stays there after the discard button is press again and again -- each time it expands larger in the window.

image

In addition, when showing the browser window, the discarded cards remain in the far left. You can only see this in a very large window.

image

I'm running ionic 2 beta.

@loringdodge
Copy link
Owner

Hey @thomastthai ,

I'm glad you liked the demo. It was originally written for educational purposes and isn't fully comprehensive so there are kinks left in it.

For the first issue (where the cards continue to grow larger and larger), this was previously an issue that resulted from clicking the discard key before the animation fully finished resulting in some logic not being completed and the cards thinking they could continue to grow to infinity. This shouldn't be an issue now though. Do you think you could provide an example codepen using Ionic 2 beta in order to diagnose the issue? Here's an example (codepen)[http://codepen.io/loringdodge/pen/ZGvMxE].

For the second issue, the distance that the card flies off to the left is a hard-coded value which is why you can see in desktop browsers but not in mobile (smaller screen). If you'd like to make it larger change the value on line 114 of ionic.swoosh.cards.js to a smaller number.

var translateX = -600;

Hopefully that helps!

@lolaswift
Copy link

lolaswift commented Jun 25, 2016

...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants