var tooltip = this.getAttribute("tooltip_obj");
if(tooltip == undefined || tooltip == null) {
tooltip = new basetooltip(canvas);
this.setAttribute("tooltip_obj",tooltip);
}
tooltip.setAttribute("opacity",0);
canvas.createChildren(carr);
var timerDelegate = new LzDelegate( this, "showTooltip",component,"name");
this.setAttribute("__timerDelegate",timerDelegate);
this.setAttribute("__currentComponent",component);
LzTimer.addTimer( timerDelegate, this.getAttribute("delay") );
this.setAttribute("__currentComponent",[]);
var timerDelegate = this.getAttribute("__timerDelegate");
LzTimer.removeTimer(timerDelegate);
this.setAttribute("__timerDelegate",[]);
this.destroyTooltip(component);
canvas.width) {
// move the start position of the tooltip so it doesnt get truncated
var diff = xDelta + tooltipWidth - canvas.width;
xDelta -= diff;
}
// does the tooltip start before the canvas starts?
if(xDelta < 0) xDelta = 0;
tooltip.setAttribute("x",xDelta);
var yPos = canvas.getMouse("y");
if(yPos > (canvas.height/2)) {
yPos -= 30; /* avoid the cursor above */
} else {
yPos += 25; /* avoid the cursor below */
}
tooltip.setAttribute("y",yPos);
tooltip.animate("opacity",1,300);
]]>
var tooltip = this.getAttribute("tooltip_obj");
tooltip.setAttribute("opacity",0);
theText.setAttribute("text",this.getAttribute("text"));