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

tooltip position fix relative #161

Open
cretace opened this issue Aug 30, 2013 · 1 comment
Open

tooltip position fix relative #161

cretace opened this issue Aug 30, 2013 · 1 comment

Comments

@cretace
Copy link

cretace commented Aug 30, 2013

How can I force tootlips to appear in a fixed relative position?
let's say 10px from left and 50px from top of rolledover area?
I want them over the area, not outside it... (and I want to ignore the width constraint)

Excellent plug in - thanks

@cretace
Copy link
Author

cretace commented Sep 2, 2013

ok so here's the hack method:
comment out the function after this line:
"// try to figure out the best place for the tooltip"
(about 18 lines of code)
replace with your hack to work out specific values
I used this:

//alert(curY+' '+minY+' '+maxY+' '+bestMinY); use to show returned values - all are relative to window top left
//(bestMinX  and Y are used as they are already declared vars)
bestMinX=minX+5;// this places tooltip 5px to right of left edge of area
bestMinY=minY+Math.floor((maxY-minY)/2)-50; // this places top of tooltip 50 px above centre line of area
nest=[bestMinX,bestMinY];

return nest;

hope this helps someone.. I haven't done much testing so it might break something else
(someone else can do the clean 'n' tidy method!)

@jamietre jamietre added support and removed support labels Aug 29, 2014
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