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

Allow background position animation, support right/bottom positions, use inversion factor in calculations, allow repeated init of elements without ID attribute #14

Merged
merged 7 commits into from Oct 31, 2011

Conversation

dzuelke
Copy link
Contributor

@dzuelke dzuelke commented Oct 14, 2011

Flag "background" can be set to animate background-position instead of element position (only allows pixel values, 0% and top/left, the rest is too complex/slow to compute due to how "100%" makes the background stick to the right/bottom of the container).

If the element was positioned using properties "right" or "bottom", then we make sure that those properties continue to be used for changing position.

ID attributes were used before to check if an element already is in the list of elements to work on, now compares DOM elements instead so no "id" attribute must exist.

Inversion factor cleans up the code a little :)

…y conditions testing for negative are not necessary anymore
@cameronmcefee
Copy link
Owner

Good stuff. I'll test it out when I have a chance and merge it in.

@dzuelke
Copy link
Contributor Author

dzuelke commented Oct 14, 2011

Found one issue already, doing another push soon... I'm actually trying to get background images to move too, just a bit of an issue with percentages as positioning, probably can't do that...

@dzuelke
Copy link
Contributor Author

dzuelke commented Oct 17, 2011

16d0a96 makes sure that if the position is declared using right or bottom instead of left or top, those properties are used for positioning just in case the parent ever resizes and the positioning relative to the right or bottom of the parent should be maintained.

3f02a4a was the original point of my fiddling: moving stuff around via background-position :)

@cameronmcefee
Copy link
Owner

Sorry I haven't merged this in yet. It's been a busy week. I'll give it a test and get it in there soon.

@dzuelke
Copy link
Contributor Author

dzuelke commented Oct 23, 2011

No worries, take your time :)

cameronmcefee pushed a commit that referenced this pull request Oct 31, 2011
Allow background position animation, support right/bottom positions, use inversion factor in calculations, allow repeated init of elements without ID attribute
@cameronmcefee cameronmcefee merged commit 23c16fd into cameronmcefee:master Oct 31, 2011
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

Successfully merging this pull request may close these issues.

None yet

2 participants