diff --git a/lib/ToolTip.js b/lib/ToolTip.js index b10ad08b..c7874eb0 100644 --- a/lib/ToolTip.js +++ b/lib/ToolTip.js @@ -73,6 +73,7 @@ export default class ToolTip extends LitElement { height: 0; visibility: hidden; transition: height 0ms 250ms linear, opacity 200ms 0ms linear; + pointer-events: none; } .tooltip::before { content: ""; diff --git a/stanzas/heatmap/index.ts b/stanzas/heatmap/index.ts index c21ad9c1..9c8ef475 100644 --- a/stanzas/heatmap/index.ts +++ b/stanzas/heatmap/index.ts @@ -214,6 +214,15 @@ export default class Heatmap extends MetaStanza { return setColor(numericValue); }); + rectGroup.on("mouseenter", function () { + const node = select(this); + rectGroup.classed("-fadeout", true); + node.classed("-fadeout", false); + }); + rectGroup.on("mouseleave", function () { + rectGroup.classed("-fadeout", false); + }); + // Add event listener rectGroup.on("click", (e, d) => { select(e.target).raise(); diff --git a/stanzas/heatmap/style.scss b/stanzas/heatmap/style.scss index 37cb2a93..50e017d0 100644 --- a/stanzas/heatmap/style.scss +++ b/stanzas/heatmap/style.scss @@ -22,9 +22,13 @@ rect { cursor: pointer; } + &.-fadeout { + opacity: var(--togostanza-fadeout-opacity); + transition: var(--togostanza-fadeout-transition); + } + &.-selected { - stroke-width: 2px; - stroke: var(--togostanza-theme-selected_border_color); + opacity: 1; } }