From: Chris Jaekl Date: Tue, 21 Nov 2017 11:38:07 +0000 (+0900) Subject: Prevent tooltips from displaying when the mouse is over the search or paging controllers. X-Git-Url: http://jaekl.net/gitweb/?p=quanweb.git;a=commitdiff_plain;h=222a53b5def154dcc59dbaad98404ea2930e8434 Prevent tooltips from displaying when the mouse is over the search or paging controllers. --- diff --git a/app/index.html b/app/index.html index d417fef..d2c48d9 100644 --- a/app/index.html +++ b/app/index.html @@ -7,7 +7,7 @@ -
+ Author: Title: @@ -26,6 +26,6 @@
(No information available)
- + diff --git a/js/BooksView.js b/js/BooksView.js index 7af3e97..1bbb8ae 100644 --- a/js/BooksView.js +++ b/js/BooksView.js @@ -48,7 +48,8 @@ var BooksView = (function() { } result += '' + '' + + ' onmouseover="ToolTip.startTooltipTimer(' + book.Id + ');"' + + ' onmouseleave="ToolTip.stopTooltipTimer();">' + '

' + book.Title + '

' + '

' + '' + book.AuthorReading + ''; diff --git a/js/ToolTip.js b/js/ToolTip.js index 0311444..5e88238 100644 --- a/js/ToolTip.js +++ b/js/ToolTip.js @@ -46,10 +46,11 @@ var ToolTip = (function () { var deltaX = Math.abs(x - mousePos.x); var deltaY = Math.abs(y - mousePos.y); - - if ( deltaX > threshold - || deltaY > threshold ) + + if ( (deltaX > threshold) + || (deltaY > threshold) ) { + my.stopTooltipTimer(); my.hideDetails(); } }; @@ -104,7 +105,6 @@ var ToolTip = (function () { clearTimeout(timer); timer = undefined; - my.hideDetails(); }; // ===============