From 222a53b5def154dcc59dbaad98404ea2930e8434 Mon Sep 17 00:00:00 2001 From: Chris Jaekl Date: Tue, 21 Nov 2017 20:38:07 +0900 Subject: [PATCH] Prevent tooltips from displaying when the mouse is over the search or paging controllers. --- app/index.html | 4 ++-- js/BooksView.js | 3 ++- js/ToolTip.js | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-) 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(); }; // =============== -- 2.39.2