From af7c37fe71331da84f39868fc71aaaf253956621 Mon Sep 17 00:00:00 2001 From: Remi PLANEL <rplanel@pasteur.fr> Date: Tue, 30 Apr 2024 12:49:04 +0200 Subject: [PATCH] gene clickable to open structure --- components/OperonStructure.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/OperonStructure.vue b/components/OperonStructure.vue index 3c723d88..accb1415 100644 --- a/components/OperonStructure.vue +++ b/components/OperonStructure.vue @@ -334,6 +334,10 @@ function drawGenes(operonGroup: d3.Selection<SVGGElement, any, SVGElement | null enter => { const gOperonItem = enter.append("g") .classed("operon-item", true) + .on("click", function (event) { + const data = d3.select<SVGElement, StructureOperonGeneWithCoordinate>(this).data() + structureBasket.set(data.map(s => s?.structPath ?? '')) + }) .on("mouseover", function (event) { const srcSelection = d3.select<SVGElement, StructureOperonGeneWithCoordinate>(event.srcElement) const node = srcSelection.data() -- GitLab