Skip to content
Snippets Groups Projects
Commit 43bad0e2 authored by Bucknell, Mary S.'s avatar Bucknell, Mary S.
Browse files

Add code to hide tooltip when showOnlyGraph is true (no interactive features)

parent 3612c8fd
No related branches found
No related tags found
No related merge requests found
......@@ -148,7 +148,7 @@ const plotAllFloodLevelPoints = function(elem, {visible, xscale, yscale, seriesP
};
const createTitle = function(elem, store, siteNo, showMLName) {
const createTitle = function(elem, store, siteNo, showMLName, showTooltip) {
let titleDiv = elem.append('div')
.classed('time-series-graph-title', true);
......@@ -164,8 +164,10 @@ const createTitle = function(elem, store, siteNo, showMLName) {
}
titleDiv.append('div')
.call(link(store,(elem, {title, variable}) => {
elem.html(title)
.call(appendTooltip, variable ? variable.variableDescription : 'No description available');
elem.html(title);
if (showTooltip) {
elem.call(appendTooltip, variable ? variable.variableDescription : 'No description available');
}
}, createStructuredSelector({
title: getTitle,
variable: getCurrentVariable
......@@ -209,7 +211,7 @@ export const drawTimeSeriesGraph = function(elem, store, siteNo, showMLName, sho
graphDiv = elem.append('div')
.attr('class', 'hydrograph-container')
.call(watermark, store)
.call(createTitle, store, siteNo, showMLName);
.call(createTitle, store, siteNo, showMLName, showTooltip);
if (showTooltip) {
graphDiv.call(drawTooltipText, store);
}
......
......@@ -9,7 +9,6 @@
@include u-text('bold');
@include at-media(tablet) {
@include typeset('ui', 9, 2);
@include u-text('bold');
}
text-align: center;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment