# HG changeset patch # User hamidouk # Date 1321269482 -3600 # Node ID 126de77ee73e9d12c5ec06ec42ce3e0755fe20b1 # Parent cf3fffbb2cb0cd4c84ebabef6dad2d30e14c395a# Parent 9b86d3c5221172b0bc346422aa07d176551a5382 Merge with slider-port diff -r 9b86d3c52211 -r 126de77ee73e src/css/LdtPlayer.css --- a/src/css/LdtPlayer.css Mon Nov 14 10:47:44 2011 +0100 +++ b/src/css/LdtPlayer.css Mon Nov 14 12:18:02 2011 +0100 @@ -183,7 +183,8 @@ } .tip{ - position : absolute; + position : fixed; /* why not absolute instead of fixed ? because the div containing the tooltip widget is not a subdiv of its parent + widget */ padding : 3px; z-index: 10000000000; max-width: 200px; @@ -196,7 +197,6 @@ padding-top: 15px; padding-right: 15px; color: black; - z-index: 10000000000; font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif"; overflow:hidden; } diff -r 9b86d3c52211 -r 126de77ee73e src/js/widgets/polemicWidget.js --- a/src/js/widgets/polemicWidget.js Mon Nov 14 10:47:44 2011 +0100 +++ b/src/js/widgets/polemicWidget.js Mon Nov 14 12:18:02 2011 +0100 @@ -275,11 +275,11 @@ e.time= frames[i].mytweetsID[k].timeframe; e.title= frames[i].mytweetsID[k].title; - e.mouseover(function(element) { return function (event) { - - // event.clientX and event.clientY are to raphael what event.pageX and pageY are to jquery. + e.mouseover(function(element) { return function (event) { + // event.clientX and event.clientY are to raphael what event.pageX and pageY are to jquery. self.TooltipWidget.show.call(self.TooltipWidget, element.title, element.attr("fill"), event.clientX - 106, event.clientY - 160); element.displayed = true; + debugger; }}(e)).mouseout(function(element) { return function () { self.TooltipWidget.hide.call(self.TooltipWidget); }}(e)).mousedown(function () { diff -r 9b86d3c52211 -r 126de77ee73e src/js/widgets/tooltipWidget.js --- a/src/js/widgets/tooltipWidget.js Mon Nov 14 10:47:44 2011 +0100 +++ b/src/js/widgets/tooltipWidget.js Mon Nov 14 12:18:02 2011 +0100 @@ -8,6 +8,7 @@ IriSP.TooltipWidget.prototype.draw = function() { var templ = Mustache.to_html(IriSP.tooltipWidget_template); + this.selector.append(templ); this.hide(); diff -r 9b86d3c52211 -r 126de77ee73e unittests/index.html --- a/unittests/index.html Mon Nov 14 10:47:44 2011 +0100 +++ b/unittests/index.html Mon Nov 14 12:18:02 2011 +0100 @@ -9,6 +9,8 @@ + + diff -r 9b86d3c52211 -r 126de77ee73e unittests/tests/tooltipWidget.js --- a/unittests/tests/tooltipWidget.js Mon Nov 14 10:47:44 2011 +0100 +++ b/unittests/tests/tooltipWidget.js Mon Nov 14 12:18:02 2011 +0100 @@ -26,6 +26,7 @@ widget.draw(); equal(widget.selector.children(".tip").length, 1, "test if the div has been added correctly"); + equal(widget.selector.children(".tip").css("position"), "fixed", "test if the widget has the correct position attr"); equal(widget.selector.children(".tip").css("left"), "-10000px", "test if div has been positionned correctly"); equal(widget.selector.children(".tip").css("top"), "-100000px", "test if div has been positionned correctly"); }); @@ -38,7 +39,7 @@ equal(widget.selector.children(".tip").css("left"), "105px", "test if div has been positionned correctly"); equal(widget.selector.children(".tip").css("top"), "240px", "test if div has been positionned correctly"); equal(widget.selector.find(".tiptext").text(), "ceci est un texte", "test if text has been set correctly"); - + widget.hide(); equal(widget.selector.children(".tip").css("left"), "-10000px", "test if div has been positionned correctly"); equal(widget.selector.children(".tip").css("top"), "-100000px", "test if div has been positionned correctly");