It looks like the screen adjust is a little bit broken after revision 23 (by that I mean 23 works fine).
The tooltip position is being adjusted correctly, but the tip itself is not being changed, remaining as whatever it was specified.
(2nd March 20:18)sveiki Wrote: [ -> ]It looks like the screen adjust is a little bit broken after revision 23 (by that I mean 23 works fine).
The tooltip position is being adjusted correctly, but the tip itself is not being changed, remaining as whatever it was specified.
To clarify, rev 24 & 25 don't actually work for me, but the problem exists in 26.
You my friend are a life saver! Just pushed up rev28 which should fix the issue, thanks for catching this!
(2nd March 20:53)Craig Wrote: [ -> ]You my friend are a life saver! Just pushed up rev28 which should fix the issue, thanks for catching this!
Still not changing the tip position, sorry!
Looks like self.cache.overflow.left and self.cache.overflow.top are both undefined when checkTip is called. All of the condition tests resolve to undefined.
This is still not working. In r28, self.cache.overflow is never defined except in checkTip, which never executes because self.cache.overflow is undefined.
I don't think the tip size is taken into account during screen adjust positioning either, since I've noticed that the tooltip boxes are being positioned differently:
Revision 23:
[
attachment=9]
Revision 28:
[
attachment=10]
sveiki, I just pushed up a new revision that might address this issue, but it appears to be working quite well for me even in revision 28. Are you positive you've updated the file correctly?
(8th March 13:53)Craig Wrote: [ -> ]sveiki, I just pushed up a new revision that might address this issue, but it appears to be working quite well for me even in revision 28. Are you positive you've updated the file correctly?
I've definitely updated to 29. Problem still happens, but I can narrow it down I think.
when I specify:
JS Code
position: {
corner: {
tooltip: "bottom center",
target: "top center"
}
}
Then it won't adjust at all. If I switch them around, ie:
JS Code
position: {
corner: {
tooltip: "top center",
target: "bottom center"
}
}
Then it WILL adjust the tip for y, but NOT for x.
Some more limitations (not all):
JS Code
tooltip:"top right", target:"bottom left"
- does not adjust for x
JS Code
tooltip:"bottom right", target:"top left"
- does not adjust for x OR y
JS Code
tooltip:"right center", target:"left center"
- does not adjust for x OR y
JS Code
tooltip:"left center", target:"right center"
- does not adjust for x
etc...
sveiki, could you update to the latest branch release please (rev32 as of this writing). This should fix your problem.
It looks like the positioning is taking the tip into account now, but the tip placement isn't changing on screed adjust. The position of the tip never changes from what is specified in the creation call. This is especially bad when I use a bottomMiddle tip pointing to topMiddle of target. When screen adjust *should* change it to a bottomLeft tip pointing to topRight of target, it doesn't change the tip position, and the tip now points way past the right end of the target.
Just as troubling is that (on FF 3) the tooltip is not being repositioned based on viewport size, but on document size. It is being repositioned properly in IE6.
I just updated to rev 34. Same problems exist.
Is there any more information you need from me on this? I can try to pare down my application to a small example that highlights the issue, if that helps.
I'm having the same problem (rev. 34). It works if you use the default position.corner settings. However, using the following settings the screen adjust feature no longer works.
JS Code
position: {
adjust: {
screen: true
},
corner: {
target: 'topLeft',
tooltip: 'bottomLeft'
}
}
The problem is probably rooted in the adapt.left and adapt.top functions.
There's a few issues here:
- The over value is only positive if the qtip is about to be displayed past the right margin of the window. What about if it is position past the left margin? This is also true (from what I can see of bottom vs. top of the window). Only if the over value is positive, does the tip position get changed.
- In cases where positioning the qtip in a center context, problems ensue: If it is positioned going off the right margin, it will not correct at all, off the left margin it will correct (to some degree), but none of the reference points on the qtip necessarily connect to any of the reference points on the target.
Is a fix for these issues on your list to get done, by any chance?
I went over the code to see if I could fix this myself. I've got it working fine now (see attached diff with revision 41).
The only thing I'm not entirely sure about is the use of the options.position.adjust.x / options.position.adjust.y.
I don't now if the implementation means always adjust x by that value or if negative always means away from the target in the left/top direction (if my.x is left/top). In the rev 41 code for adapt.top and adapt.left, that *seems* to be the case. But I don't know how to handle it then if you screen adjust to my.x/my.y = 'middle' from a different value, what do you do with the options.position.adjust.x/y then? Please correct my implementation as you see fit.
I noticed a mistake or two. I wasn't taking into account situations where my original implementation would try to put things at my.x = 'center' AND my.y = 'center'. Fixed that.
Also made a mistake in repositioning for adapt.top in some cases (used x values instead of y values).
Here is the updated version.
I'm working on some additional corrections, stay tuned.
(25th March 22:59)sveiki Wrote: [ -> ]I'm working on some additional corrections, stay tuned.
Okay, I made some more significant changes to my fix. If adjusting to one side will cause the qTip to overflow on that side, it'll pick whichever side minimizes the cut-off.
The fix now takes into account the border radius when adjusting. I don't think earlier revisions (<= 23) took that into account, either.
Screen adjustment fixes have been pushed up to revision 42, thanks Jeremy.