Skip to content

Store the actual starting positions. #46

merged 1 commit into from May 9, 2013

2 participants

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.

@magebarf magebarf Improve starting position.
If mouse pointer is positioned at middle of screen, this will not make the layers jump on first position update.
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 cameronmcefee merged commit bf9dff5 into cameronmcefee:master May 9, 2013

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

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
Something went wrong with that request. Please try again.