mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
Merge pull request #947 from hgiesel/noclickonemptybins
No clicking on empty bins in the Histogram
This commit is contained in:
commit
4a88a4749c
1 changed files with 4 additions and 1 deletions
|
@ -162,6 +162,9 @@ export function histogramGraph(
|
||||||
.on("mouseout", hideTooltip);
|
.on("mouseout", hideTooltip);
|
||||||
|
|
||||||
if (data.onClick) {
|
if (data.onClick) {
|
||||||
hoverzone.attr("class", "clickable").on("click", data.onClick);
|
hoverzone
|
||||||
|
.filter((d: Bin<number, number>) => d.length > 0)
|
||||||
|
.attr("class", "clickable")
|
||||||
|
.on("click", data.onClick);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue