foo_spider_monkey_panel icon indicating copy to clipboard operation
foo_spider_monkey_panel copied to clipboard

Tooltip.TrackPosition() offset is ignored

Open Ottodix opened this issue 2 years ago • 1 comments

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;
}

Ottodix avatar Feb 26 '22 09:02 Ottodix

Heh, you've found a regression from v1.3.0... Thanks for the bug report =)

TheQwertiest avatar Jun 16 '22 22:06 TheQwertiest