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

Explode: height / width vs outerHeight / outerWidth #205

Closed
green-arrow opened this issue Mar 14, 2015 · 2 comments
Closed

Explode: height / width vs outerHeight / outerWidth #205

green-arrow opened this issue Mar 14, 2015 · 2 comments

Comments

@green-arrow
Copy link

This is meant to start a discussion on the use of jQuery .width() and .height in the explode animation (also present in flyTo). Was there a specific reasoning behind choosing these two methods instead of outerWidth() and outerHeight?

To give some context as to what prompted this question, I am displaying a list of items in a <ul>. Using liquid-with, I am animating items with the explode transition when the user applies filters. The issue is that my list items have padding, and the use of width() and height() cause "jerky" animations, because the real width / height are applied after the animation is over, causing the item to "snap" into place.

I feel that with the widespread use of border-box, padding and border are taken into account in the width / height calculation for elements most of the time. That being the case, it would make sense to me to use outerHeight and outerWidth in these transitions.

If the current version needs to be kept, perhaps we can add an option that would allow the outer method to be called?

Open to ideas, or someone telling me why this is a horrible idea 😄

@ef4
Copy link
Collaborator

ef4 commented Mar 14, 2015

I think you're right, it's just an oversight that I'm using width instead of outerWidth in these two transitions. We should switch.

@ef4
Copy link
Collaborator

ef4 commented Apr 1, 2015

Closed via 8622f07

@ef4 ef4 closed this as completed Apr 1, 2015
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

2 participants