Skip to content

Commit

Permalink
peak metric with hover on legend
Browse files Browse the repository at this point in the history
  • Loading branch information
bmario committed Oct 24, 2024
1 parent e6a7c5e commit d8e9ce6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/ui/metric-legend.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<li
:class="[{ 'no_drawing' : !draw } , 'legend_item', 'legend_item_' + position]"
@click="metricPopup"
@mouseenter="onMouseEnter"
@mouseleave="onMouseLeave"
>
<span>
<div
Expand Down Expand Up @@ -83,6 +85,14 @@ export default {
}
},
methods: {
onMouseEnter () {
this.$store.commit('metrics/setPeakedMetric', { metric: this.metric.key })
window.MetricQWebView.graticule.draw(false)
},
onMouseLeave () {
this.$store.commit('metrics/setPeakedMetric', { metric: undefined })
window.MetricQWebView.graticule.draw(false)
},
metricPopup () {
this.$store.commit('metrics/setPopup', {
metricKey: this.$props.metric.key,
Expand Down

0 comments on commit d8e9ce6

Please sign in to comment.