Skip to content

Commit

Permalink
Add click event listener in sequence-heatmap to be consistent with th…
Browse files Browse the repository at this point in the history
…e rest of the tracks
  • Loading branch information
Swaathik committed Dec 18, 2024
1 parent b1f6179 commit 93879ed
Showing 1 changed file with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
);
});
}

/**
Expand Down

0 comments on commit 93879ed

Please sign in to comment.