Skip to content
Snippets Groups Projects
Commit 0d8539b6 authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

Display help using content wrapping

parent f9fe31de
No related branches found
No related tags found
No related merge requests found
Pipeline #130229 waiting for manual action with stages
in 6 minutes and 52 seconds
...@@ -562,29 +562,29 @@ watch(genesTextRotate, (genesTextRotateVal) => { ...@@ -562,29 +562,29 @@ watch(genesTextRotate, (genesTextRotateVal) => {
} }
}) })
}, { deep: true, immediate: true }) }, { deep: true, immediate: true })
const show = ref(false)
</script> </script>
<template> <template>
<div ref="gbContainer"> <div ref="gbContainer">
<v-card flat color="transparent"> <v-card flat color="transparent">
<v-card-item> <v-card-item>
<v-card-title>Operon structure <v-btn size="x-small" density="comfortable" variant="tonal" <v-card-title>Operon structure <v-btn size="x-small" density="comfortable" variant="tonal"
icon="mdi-help" @click="snackbar = true"> :icon="show ? 'mdi-chevron-up' : 'mdi-help'" @click="show = !show"></v-btn>
</v-btn></v-card-title> </v-card-title>
<v-card-subtitle>defenseFinder model version : {{ structureVersion }}</v-card-subtitle> <v-card-subtitle>defenseFinder model version : {{ structureVersion }}</v-card-subtitle>
</v-card-item> </v-card-item>
<v-expand-transition>
<div v-show="show">
<v-card-text class="pt-1">
<v-alert type="info" variant="tonal">
Click on the structure image to visualize it.
</v-alert>
</v-card-text>
</div>
</v-expand-transition>
<svg ref="svgRef" :width="computedContainerWidth" :height="plotHeight"> <svg ref="svgRef" :width="computedContainerWidth" :height="plotHeight">
<g class="x-axis" /> <g class="x-axis" />
</svg> </svg>
<v-snackbar v-model="snackbar">
Click on the structure image to
visualize it.
<template v-slot:actions>
<v-btn color="info" variant="text" @click="snackbar = false">
Close
</v-btn>
</template>
</v-snackbar>
</v-card> </v-card>
</div> </div>
</template> </template>
\ No newline at end of file
...@@ -116,8 +116,12 @@ const computedPDocksMatrixPlotOptions = computed(() => { ...@@ -116,8 +116,12 @@ const computedPDocksMatrixPlotOptions = computed(() => {
const matrixElemSizeVal = toValue(matrixElemSize) const matrixElemSizeVal = toValue(matrixElemSize)
const { marginBottom, marginLeft, marginRight, marginTop } = toValue(margin) const { marginBottom, marginLeft, marginRight, marginTop } = toValue(margin)
return toValue(groupedPdocks).map((matrix) => { return toValue(groupedPdocks).map((matrix) => {
const plotWidth = matrix[1][0].system_genes.length * matrixElemSizeVal + marginLeft + marginRight
console.log(matrix[0])
console.log(matrix[1][0].system_genes.length)
console.log(plotWidth)
return { return {
width: matrix[1][0].system_genes.length * matrixElemSizeVal + marginLeft + marginRight, width: plotWidth,
height: matrix[1][0].system_genes.length * matrixElemSizeVal + marginTop + marginBottom, height: matrix[1][0].system_genes.length * matrixElemSizeVal + marginTop + marginBottom,
title: matrix[0], title: matrix[0],
padding: 0, padding: 0,
...@@ -197,6 +201,8 @@ function displayStructure(item) { ...@@ -197,6 +201,8 @@ function displayStructure(item) {
structureTitle.value = item.proteins_in_the_prediction.join(" / ") structureTitle.value = item.proteins_in_the_prediction.join(" / ")
} }
const show = ref(false)
</script> </script>
<template> <template>
...@@ -205,24 +211,23 @@ function displayStructure(item) { ...@@ -205,24 +211,23 @@ function displayStructure(item) {
<v-card-item> <v-card-item>
<v-card-title>Dimer pDockQ matrix <v-btn size="x-small" density="comfortable" variant="tonal" <v-card-title>Dimer pDockQ matrix <v-btn size="x-small" density="comfortable" variant="tonal"
icon="mdi-help" @click="snackbar = true"> :icon="show ? 'mdi-chevron-up' : 'mdi-help'" @click="show = !show"></v-btn>
</v-btn>
</v-card-title> </v-card-title>
</v-card-item> </v-card-item>
<v-expand-transition>
<div v-show="show">
<v-card-text class="pt-1">
<v-alert type="info" variant="tonal">
<p>HeatMap that represent bla bla.</p>
<p>You can click on each cell to display dimer predicted structure</p>
</v-alert>
</v-card-text>
</div>
</v-expand-transition>
<v-card-text> <v-card-text>
<PlotFigure ref="matrixPlot" :options="unref(option)" defer class="pdockq-plot" <PlotFigure ref="matrixPlot" :options="unref(option)" defer class="pdockq-plot"
:data-label="option.legend.label"></PlotFigure> :data-label="option.legend.label"></PlotFigure>
</v-card-text> </v-card-text>
<v-snackbar v-model="snackbar" multi-line vertical>
<p>HeatMap that represent bla bla.</p>
<p>You can click on each cell to display dimer predicted structure</p>
<template v-slot:actions>
<v-btn color="info" variant="text" @click="snackbar = false">
Close
</v-btn>
</template>
</v-snackbar>
<!-- <PdbeMolstarPlugin v-model:title="structureTitle" /> -->
</v-card> </v-card>
<v-card v-else flat color="transparent"> <v-card v-else flat color="transparent">
<v-card-text> <v-card-text>
......
...@@ -60,6 +60,7 @@ function extractGeneName(name: string) { ...@@ -60,6 +60,7 @@ function extractGeneName(name: string) {
const sanitizedHits = computed<StructureOperonGeneWithImg[]>(() => { const sanitizedHits = computed<StructureOperonGeneWithImg[]>(() => {
const toValMsResponse = toValue(msResponse) const toValMsResponse = toValue(msResponse)
if (toValMsResponse && toValMsResponse?.hits?.length > 0) { if (toValMsResponse && toValMsResponse?.hits?.length > 0) {
console.log(toValMsResponse.hits)
return toValMsResponse.hits.map(hit => { return toValMsResponse.hits.map(hit => {
// get structure information for this prot // get structure information for this prot
const monomerStructuresVal = toValue(monomerStructures) const monomerStructuresVal = toValue(monomerStructures)
...@@ -106,6 +107,8 @@ const sanitizedSubsystem = computed(() => { ...@@ -106,6 +107,8 @@ const sanitizedSubsystem = computed(() => {
}) })
const contentWidth = computed(() => { const contentWidth = computed(() => {
console.log(subsystem)
console.log(sanitizedHits.value)
return sanitizedHits.value.length * sizeGene.value return sanitizedHits.value.length * sizeGene.value
}) })
...@@ -117,15 +120,6 @@ onMounted(() => { ...@@ -117,15 +120,6 @@ onMounted(() => {
fetchSubsytems() fetchSubsytems()
}) })
// const maxOperonSize = computed(() => {
// const allSubsystemsVal = toValue(allSubsystems)
// return d3.max(d3.groups(allSubsystemsVal?.hits ?? [], d => d.subsystem)
// .map(([_, val]) => {
// return val.reduce((acc, curr) => {
// return acc + curr.size
// }, 0)
// }))
// })
const msFilters = computed(() => { const msFilters = computed(() => {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment