foo_spider_monkey_panel
foo_spider_monkey_panel copied to clipboard
Tooltip.TrackPosition() offset is ignored
Hi,
Looks like the TrackPosition(x,y) method of the tooltip object is broken. The x,y values have zero effect, the tooltip is always positioned right below the cursor.
var m_x = m_y = 0;
var tooltip = window.CreateTooltip();
var tooltip_activated = false;
tooltip.TrackActivate = true;
tooltip_x_offset = tooltip_y_offset = -1000;
function on_mouse_move(x, y){
if(m_x==x && m_y==y) return;
console.log("on_mouse_move")
if(!tooltip_activated){
tooltip.Text = "test";
tooltip.Activate();
tooltip_activated = true;
tooltip.TrackActivate = true;
}
tooltip.TrackPosition(x+tooltip_x_offset, y+tooltip_y_offset);
m_x = x; m_y = y;
}
function on_mouse_leave(x, y){
console.log("on_mouse_leave")
tooltip.Deactivate();
tooltip_activated = false;
}
Heh, you've found a regression from v1.3.0... Thanks for the bug report =)