From ecf6f6b0e3083b7c039879b42c79a9099dce7fd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Wed, 24 May 2017 10:30:03 +0200 Subject: [PATCH] main.js: make sure to hide the hover tool There are too many in the statistics plot (one per airframe) and I did not find a way how to combine them into one. --- plot_app/templates/main.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/plot_app/templates/main.js b/plot_app/templates/main.js index 41c3eabe4..fee9fc72e 100644 --- a/plot_app/templates/main.js +++ b/plot_app/templates/main.js @@ -108,6 +108,21 @@ function setSize(size) { {% endif %} {# is_plot_page #} +{% if is_stats_page %} +// ok, this is ugly: there are too many hover tools (one per airframe in a +// single plot), so hide them from the toolbar here. Some actions like resetting +// the plot make them reappear, so we continuously repeat the call. +function hide_bokeh_hover_tool() { + $(".bk-tool-icon-hover").parent('div').css("display", "none"); + window.setTimeout(hide_bokeh_hover_tool, 200); +} + +$(function() { //on startup + window.setTimeout(hide_bokeh_hover_tool, 500); +}); + +{% endif %} {# is_stats_page #} + // auto-hide sticky header when scrolling down, show when scrolling up // source: http://osvaldas.info/auto-hide-sticky-header ;( function( $, window, document, undefined )