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

Projects
None yet
2 participants
Contributor

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 :)

@dzuelke dzuelke use positive or negative multiplier for inversion internally, that wa…
…y conditions testing for negative are not necessary anymore
f1c0c49
Owner

cameronmcefee commented Oct 14, 2011

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

Contributor

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...

Contributor

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 :)

Owner

cameronmcefee commented Oct 23, 2011

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.

Contributor

dzuelke commented Oct 23, 2011

No worries, take your time :)

@cameronmcefee cameronmcefee pushed a commit that referenced this pull request Oct 31, 2011

Cameron McEfee Merge pull request #14 from dzuelke/backgrounds
Allow background position animation, support right/bottom positions, use inversion factor in calculations, allow repeated init of elements without ID attribute
23c16fd

@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