diff --git a/packages/nightingale-sequence-heatmap/src/nightingale-sequence-heatmap.ts b/packages/nightingale-sequence-heatmap/src/nightingale-sequence-heatmap.ts index 9e409c27..04ee9ddb 100644 --- a/packages/nightingale-sequence-heatmap/src/nightingale-sequence-heatmap.ts +++ b/packages/nightingale-sequence-heatmap/src/nightingale-sequence-heatmap.ts @@ -450,24 +450,24 @@ class NightingaleSequenceHeatmap extends withManager( } }); - // this.heatmapInstance.events.hover.subscribe((d) => { - // // data to send to nightingale can be null if hover outside boundaries - // let toSend = null; - // if (d && d.cell && d.cell.xIndex) { - // toSend = `${d.cell.xIndex + 1}:${d.cell.xIndex + 1}`; - // } - // // On heatmap zoom dispatch event to Nightingale - // this.dispatchEvent( - // new CustomEvent("change", { - // detail: { - // value: toSend, - // type: "highlight", - // }, - // bubbles: true, - // cancelable: true, - // }) - // ); - // }); + this.heatmapInstance.events.select.subscribe((d) => { + // data to send to nightingale can be null if click is outside boundaries + let toSend = null; + if (d && d.cell && d.cell.xIndex) { + toSend = `${d.cell.xIndex + 1}:${d.cell.xIndex + 1}`; + } + // On heatmap zoom dispatch event to Nightingale + this.dispatchEvent( + new CustomEvent("change", { + detail: { + value: toSend, + type: "highlight", + }, + bubbles: true, + cancelable: true, + }) + ); + }); } /**