# HG changeset patch # User hamidouk # Date 1325245133 -3600 # Node ID ae0f2ec05ed73ad7384e0ef9f18722bf27977652 # Parent 8abffd2de54ad85eaea812c6201b9ec5032146da fixed long-standing tooltip positioning bug. diff -r 8abffd2de54a -r ae0f2ec05ed7 src/css/LdtPlayer.css --- a/src/css/LdtPlayer.css Fri Dec 30 11:55:54 2011 +0100 +++ b/src/css/LdtPlayer.css Fri Dec 30 12:38:53 2011 +0100 @@ -299,10 +299,7 @@ } .tip{ -/* why not absolute instead of fixed ? because the div containing the tooltip widget is not a subdiv of its parent - widget */ - /*position : fixed; */ - position:fixed; + position: absolute; padding : 3px; z-index: 10000000000; max-width: 200px; diff -r 8abffd2de54a -r ae0f2ec05ed7 src/js/widgets/segmentsWidget.js --- a/src/js/widgets/segmentsWidget.js Fri Dec 30 11:55:54 2011 +0100 +++ b/src/js/widgets/segmentsWidget.js Fri Dec 30 12:38:53 2011 +0100 @@ -135,8 +135,10 @@ var offset_x = offset.left + correction - 106; if (offset_x < 0) offset_x = 0; - - self.TooltipWidget.show(divTitle, color, offset_x, event.pageY - 160); + + var offset_y = offset.top; + console.log(offset_y); + self.TooltipWidget.show(divTitle, color, offset_x, offset_y - 160); } })(divTitle)).mouseout(function(){ IriSP.jQuery(this).animate({opacity: 0.3}, 5); self.TooltipWidget.hide(); diff -r 8abffd2de54a -r ae0f2ec05ed7 src/js/widgets/tooltipWidget.js --- a/src/js/widgets/tooltipWidget.js Fri Dec 30 11:55:54 2011 +0100 +++ b/src/js/widgets/tooltipWidget.js Fri Dec 30 12:38:53 2011 +0100 @@ -11,7 +11,8 @@ IriSP.TooltipWidget.prototype.draw = function() { var templ = Mustache.to_html(IriSP.tooltipWidget_template); - + // position the widget absolutely relative to document. + this.selector.css("position", "static"); this.selector.append(templ); this.hide();