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

Proximity event broken under jQuery 1.8.0 #18

Closed
ktonini opened this issue Sep 4, 2012 · 6 comments
Closed

Proximity event broken under jQuery 1.8.0 #18

ktonini opened this issue Sep 4, 2012 · 6 comments

Comments

@ktonini
Copy link

ktonini commented Sep 4, 2012

it appears as if the proximity location is stuck to the upper left of the target div

@ktonini
Copy link
Author

ktonini commented Sep 4, 2012

Fixed by changing lines 199, and 120 respectively -

    right = left + el.width();
    bottom = top + el.height();

Just a quick fix though, there's probably a better way. See http://blog.jquery.com/2012/08/16/jquery-1-8-box-sizing-width-csswidth-and-outerwidth/

@padolsey
Copy link
Member

padolsey commented Sep 7, 2012

I cannot reproduce this breaking with jQuery 1.8. See http://jsbin.com/oxenow/1/ (seems to work fine)

Could you provide code which breaks it?

@ktonini
Copy link
Author

ktonini commented Sep 7, 2012

Hmm, this is what I'm using -

$('#title').on('proximity', {max: 50, fireOutOfBounds: true}, function(event, proximity, distance){
    $('#titleDots').css('opacity', proximity);
});

@ktonini
Copy link
Author

ktonini commented Sep 7, 2012

And here are the css properties on the #title element in case it has something to do with that, although it was behaving the same way on two instances of proximity that I had.

#title {
text-align: center;
position: relative;
margin-bottom: -45px;
top: 65px;
font-size: 18px;
text-shadow: 0 -4px 4px rgba(0, 0, 0, 0.38), 0 4px 4px rgba(0, 0, 0, 0.38);
letter-spacing: 4px;
height: 45px;
cursor: default;
-webkit-transform: translate3d(0,0,0);
}

@ktonini
Copy link
Author

ktonini commented Sep 7, 2012

...so I just switched it back to outerWidth and outerHeight, and it's working fine. Strange, perhaps it had to do with a code minifying script that I was testing around the time I updated to jq1.8, I'll let you know if it happens again and if i can reproduce it.

@padolsey
Copy link
Member

padolsey commented Sep 8, 2012

Cool okay, glad it's working again.

@padolsey padolsey closed this as completed Sep 8, 2012
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