|
Adjusting the tip based on screen adjustment
|
|
31st December, 16:35
Post: #1
|
|||
|
|||
|
Adjusting the tip based on screen adjustment
I love this plugin but I feel its missing just one small thing that would seriously make it ideal. The clueTip plugin has this feature and that is to adjust the tip when the tooltip is adjust for screen.
For instance, the tooltip is positioned higher than the target due to it overflowing the viewport, the tip than should adjust lower so its aligned with the target still. I tried using the beforePositionUpdate and beforeShow to identify this and then change the position of the tooltip corner to maybe render above the target with the "topMiddle" and "bottomMiddle" but that didn't work since once the position is set there doesn't seem to be a way to change this. Is there a way to do this as a part of the plugin? |
|||
|
2nd January, 19:15
Post: #2
|
|||
|
|||
|
Adjusting the tip based on screen adjustment
huzaifa.tapal, not entirely sure I understand the problem. Have you tried the screen adjustment settings? This sounds like the functionality you require.
Craig Thompson Web Developer / Designer Craigsworks http://www.craigsworks.com |
|||
|
5th January, 03:52
Post: #3
|
|||
|
|||
|
Adjusting the tip based on screen adjustment
I'm using the screen adjustment already and the tooltip does adjust higher when the target is right at the bottom of the viewport or adjust down if the target hugging the top of the viewport but what doesn't adjust is the actual tip.
For instance, if I've set the tip positioning to "leftMiddle" then if the target is at the bottom of the viewport causing the tooltip to adjust higher than the target, the tooltip is still at "leftMiddle" and so its now pointing at thin air. I'll post an image soon. |
|||
|
6th January, 15:52
(This post was last modified: 6th January 17:44 by Ely.)
Post: #4
|
|||
|
|||
Adjusting the tip based on screen adjustment
htapal Wrote:I'm using the screen adjustment already and the tooltip does adjust higher when the target is right at the bottom of the viewport or adjust down if the target hugging the top of the viewport but what doesn't adjust is the actual tip. The qTip positioning is set to: JS Code
Notice in the image below how the tooltip adjusted down so it doesn't flow off the top of the viewport but the tooltip did not adjust to point to the target and is pointing to thin air. I'd like for there to be an ability to specify tooltip corners smartly in this case. |
|||
|
6th January, 17:55
Post: #5
|
|||
|
|||
|
Adjusting the tip based on screen adjustment
After going through the source I found that there was an adjustment being done to the tip when the screenAdjust method was being called but only if the tooltip corner was one of "topLeft", "topRight", "bottomLeft", or "bottomRight".
The code in the screenAdjust is as follows: JS Code
Given this, if the original position I had posted was changed to JS Code
then the tip was adjusting so that when the tooltip was overflowing to the top then the tooltip would move below the target and the tooltip would be positioned to "topLeft" Given this, I made a small change to also adjust when the tooltip corner is set to "leftTop", "leftMiddle", "leftBottom", "rightTop", "rightMiddle", "rightBottom" by making this small change to the source above JS Code
this change caused the tooltip to display as follows as compared to the previously posted image Craig, do you see any problems with this change? |
|||
|
27th October, 06:02
Post: #6
|
|||
|
|||
|
RE: Adjusting the tip based on screen adjustment
I had the exact same problem. Tips that are "left/right biased" (my name for it) (eg leftBottom) don't reposition during a screen adjust, whereas "top/bottom biased" (eg bottomLeft) work fine. @htapal I think your approach is in the right direction but was incomplete for my needs. Here's what works for me:
JAVASCRIPT Code
|
|||
|
17th June, 02:29
Post: #7
|
|||
|
|||
|
RE: Adjusting the tip based on screen adjustment
first thanks craig for such amazing plugin!
nomax - your solution works great! i set the tooltip to "leftMiddle" as well and your solution adjust well for the different elements on different parts of the screen. the only catch is that i have some elements on the right and the tooltip automatically moves to the left (which is awesome). But the arrow doesn't follow accordingly (stays as "leftTop", "leftMiddle" or "leftBottom". So I changed the following lines and it fixes the arrow problem. just wanted to share in case anyone needs this solution. JS Code
|
|||
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads... | |||||
| Thread: | Author | Replies: | Views: | Last Post | |
| Open a new tip on a tip close | hari41980 | 3 | 1,739 |
31st August 11:49 Last Post: Craig |
|
User(s) browsing this thread: 1 Guest(s)

Search
Member List
Calendar
Help




