diff --git a/components/content/pdockqMatrix.vue b/components/content/pdockqMatrix.vue index 3767cdaee6cb44feba826e9fdbabbd2cb83598b2..881deb31dbd95ab4c4b4d8e58338fcb49e3a317d 100644 --- a/components/content/pdockqMatrix.vue +++ b/components/content/pdockqMatrix.vue @@ -54,6 +54,9 @@ onMounted(async () => { throw createError("Error while getting structure pdocks") } + + attachEventHandler() + }) const computedSystem = computed(() => { @@ -140,7 +143,8 @@ function getDataLabelFromCell(elem) { const parent = elem.parentNode.parentNode.parentNode.parentNode return parent.dataset.label } -watch(matrixPlot, () => { + +function attachEventHandler() { const cells = d3.selectAll(".pdockq-plot").selectAll("rect") console.log("cells rect on watch") console.log(cells) @@ -161,6 +165,10 @@ watch(matrixPlot, () => { else { console.log("no data found") } }) +} + +watch(matrixPlot, () => { + attachEventHandler() }) function pdbNameToCif(pdbPath: string) { const cifPath = pdbPath.split(".").slice(0, -1).join(".")