Always break tooltip title into two lines on narrow screens.

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2020-01-02 13:28:01 +00:00
committed by XhmikosR
parent f2713a9b3d
commit 4337dabff6

View File

@@ -257,12 +257,20 @@ $(document).ready(function() {
padNumber(time.getMinutes()) +
":" +
padNumber(time.getSeconds());
if (from_date === until_date) {
// Abbreviated form for intervals on the same day
return "Queries from " + from_time + " to " + until_time + " on " + from_date;
// We split title in two lines on small screens
if ($(window).width() < 992) {
until_time += "\n";
}
return ("Queries from " + from_time + " to " + until_time + " on " + from_date).split(
"\n "
);
}
// Full tooltip for intervals spanning more than one date.
// Full tooltip for intervals spanning more than one day
// We split title in two lines on small screens
if ($(window).width() < 992) {
from_date += "\n";