Hello,
I was having some awful issues trying to use the dijit tooltip along with my svg based nodes.
I tracked the issue down to the placeOnScreenAroundElement method, which calls dojo.coords to get the location of the element. That routine only works if the element has an x,y position on the screen. SVG components have a translated location.
I added the following code to fix the issue:
var aroundNodePos = dojo.coords(aroundNode, true);
// svg does not have the normal placement policy
if (aroundNode instanceof SVGElement){
var origPosh = aroundNodePos.h;
var CTM = aroundNode.getScreenCTM();
var bbox = aroundNode.getBBox();
var view = dijit.getViewport();
//aroundNodePos.h = bbox.height;
//aroundNodePos.w = bbox.width;
aroundNodePos.h = bbox.width;
aroundNodePos.w = bbox.height;
aroundNodeH = bbox.height;
aroundNodeW = bbox.width;
aroundNodePos.x = CTM.e+view.l;
aroundNodePos.l =0 ;
aroundNodePos.y = CTM.f+view.t;
aroundNodePos.t = 0;
}
// svg does not have the normal placement policy
if (aroundNode instanceof SVGElement){
var origPosh = aroundNodePos.h;
var CTM = aroundNode.getScreenCTM();
var bbox = aroundNode.getBBox();
var view = dijit.getViewport();
//aroundNodePos.h = bbox.height;
//aroundNodePos.w = bbox.width;
aroundNodePos.h = bbox.width;
aroundNodePos.w = bbox.height;
aroundNodeH = bbox.height;
aroundNodeW = bbox.width;
aroundNodePos.x = CTM.e+view.l;
aroundNodePos.l =0 ;
aroundNodePos.y = CTM.f+view.t;
aroundNodePos.t = 0;
}
I am not sure how cross browser compatible it is. It should probably be put in the dojo.coords, but I could not find the location of the actual routine in dojo.
Just thought I would post this, since it took me a while to figure out and it might be helpful for future baselines.
-- Carolyn

i only caught this because
i only caught this because it got a spam link, but after reading the above I feel like I should mention in the coming Dojo 1.2, Charting has tooltips, which means their is either a SVG-capable tooltip subclass, or the tooltip got some updates to work better with SVG. just sayin ...