Skip to content

Commit

Permalink
Reset day selection on mouse leaving chart (#8285)
Browse files Browse the repository at this point in the history
  • Loading branch information
szakarias authored Nov 14, 2024
1 parent 4ebac35 commit ce6193b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/web_app/lib/src/widget/weekly_sparkline/widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,15 @@ void drawChart(Element svg, HTMLDivElement toolTip, HTMLDivElement chartSubText,
lastSelectedDay = selectedDay.date;
});

void erase(_) {
void hideSparklineCursor(_) {
sparklineCursor.setAttribute('style', 'opacity:0');
toolTip.setAttribute('style', 'opacity:0;position:absolute;');

chartSubText.text = '${formatDate(firstDay)} - ${formatDate(lastDate)}';
lastSelectedDay = null;
}

erase(1);
chart.onMouseLeave.listen(erase);
hideSparklineCursor(1);
chart.onMouseLeave.listen(hideSparklineCursor);
}

int lowerBoundBy<E, K>(List<E> sortedList, K Function(E element) keyOf,
Expand Down

0 comments on commit ce6193b

Please sign in to comment.