PDA

View Full Version : ToolTip and Raphael framework



Mycoding
14 Oct 2010, 6:00 AM
Please, give me advice.
I need to do map on framework Raphael.
In map should be city and when we mouse over city it should be shown ToolTip,
but in Raphael framework that is not possible to set id to element cause it svg/vml framework.
ToolTip as far as I know should be initilize before the main code and with target:'id'.
Is it possible to use without target?
In code it's possible to know when mouseover city and when is out.

Animal
14 Oct 2010, 6:29 AM
An SVG <path> element is just an HTML element which has an ID and against which you can add a ToolTip:

http://i131.photobucket.com/albums/p286/TimeTrialAnimal/raphael-with-tooltip.jpg

Or you can give it a class, and add a listener to the parent <svg> element and use the delegate option. It's still just HTML.

Mycoding
14 Oct 2010, 6:57 AM
Thanks a lot.
You help me very much.

Mycoding
4 Jan 2011, 6:59 AM
I am very sorry.
But I still don't know how to add id to path.
I need ad id to map of Russia.
http://vreshenie.ru/work/svg/map/3.html