Forums >
Tipster >
Placing a tip on the left of the cursor
Author
Message
1) GrahamOrfordGroup: Members Posts: 19Joined: 2 Oct 2004Location: IP: 194.62.--.--
Posted:
If I place an image on the right of the page it looks nicer if the title appears to the left of the cursor. By using a monospaced font and counting the number of characters I can place the titletip consistently next to the left of the cursor.
My problem is, monospaced fonts don't look very nice. The tip div seems to auto size from the left to fit the text. Is it possible to auto size from the right, using the cursor position as the start point?
The reason I went down this route is because the titletip can cause scroll bars to pop up unexpectedly if the text goes beyond the window edge.
2) Angus TurnbullGroup: Moderators Posts: 4235Joined: 7 Dec 2003Location: New ZealandIP: 203.109.--.--
Posted:
Try the newer SuperNote script, it uses CSS for formatting and by default is a fixed width with the text content wrapping within. To popout to the left you will have to edit the source and make a new "position" type (just copy the mouseoffset one, and subtract rather than add pixels from its position). If you are really enthusiastic, subtract the mouse position from the window width, remove the fixed width of the notes, and assign "right" rather than "left" which will create the effect you describe (in theory, I haven't tried it).
You could probably do something similar with this script too -- fix the width and position it left. Left-alignment of the position re: the mouse is hardcoded in this script.
Good luck - Angus.
3) GrahamOrfordGroup: Members Posts: 19Joined: 2 Oct 2004Location: IP: 62.105.--.--
Posted:
Hi Angus,
I found a way of doing it using Tipster. By setting the three values in titlesToTips to zero the Tip floats on top of the cursor. If you add the following code before the line that starts "if(tipX+tipW+5>sX+wW)tipX=sX+wW-tipW-5;" you get the desired affect.
When the cursor is in the left side of the page the tip is to the right of the cursor, and when the cursor moves over to the right of the page the tip switches over to the left of the cursor. Also, you can use any font type or size. As always my inital attempt was crude and inflexible but this one works much better.
I hope this proves of some help to others out there.
Graham
4) Angus TurnbullGroup: Moderators Posts: 4235Joined: 7 Dec 2003Location: New ZealandIP: 202.36.--.--