Skip to content

Commit

Permalink
main.js: make sure to hide the hover tool
Browse files Browse the repository at this point in the history
There are too many in the statistics plot (one per airframe) and I did not
find a way how to combine them into one.
  • Loading branch information
bkueng authored and LorenzMeier committed May 25, 2017
1 parent 4533307 commit ecf6f6b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions plot_app/templates/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit ecf6f6b

Please sign in to comment.