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

Store the actual starting positions. #46

Merged
merged 1 commit into from May 9, 2013

Conversation

magebarf
Copy link
Contributor

@magebarf magebarf commented May 9, 2013

If mouse pointer is positioned at middle of screen when activating Plax, if there is any margin applied to any elements they will make a "leap" upon first plaxifier update.

This seems to stem from the offsetLeft and offsetTop not taking the margin into consideration, which the jQuery .position() values does.

Clearest example of this I've found is the GitHub error 500 page, where the "Ooops" text has a 10px margin defined. Positioning the mouse pointer near the middle of the page, and reloading the page, all elements but the text layer can be made to stay roughly in the same place, but the text layer will always make a jump, of roughly 10 pixels.

If mouse pointer is positioned at middle of screen, this will not make the layers jump on first position update.
@magebarf
Copy link
Contributor Author

magebarf commented May 9, 2013

Thought I'd sent the last of my findings over. :)

This will most probably be the last pull request from my end for a while.

cameronmcefee pushed a commit that referenced this pull request May 9, 2013
Store the actual starting positions.
@cameronmcefee cameronmcefee merged commit bf9dff5 into cameronmcefee:master May 9, 2013
@cameronmcefee
Copy link
Owner

Nice! Thanks for your contributions. They're much appreciated.

@magebarf
Copy link
Contributor Author

magebarf commented May 9, 2013

Thanks for an awesome plugin to start off with! It's just the right level of complexity and features, and the execution and experience is great! 👍

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