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

Merge branch 'operon-struct-type' into operon-struct-type-article-update

parents 4379acb4 d59b75af
No related tags found
No related merge requests found
...@@ -4,6 +4,7 @@ import { computed, toValue, ref, onMounted, watchEffect, unref } from 'vue' ...@@ -4,6 +4,7 @@ import { computed, toValue, ref, onMounted, watchEffect, unref } from 'vue'
import * as d3 from "d3"; import * as d3 from "d3";
import * as Plot from "@observablehq/plot"; import * as Plot from "@observablehq/plot";
import { useDisplay } from "vuetify"; import { useDisplay } from "vuetify";
import { useElementSize } from '@vueuse/core'
export interface PlotMargin { export interface PlotMargin {
marginTop: number, marginTop: number,
...@@ -14,7 +15,7 @@ export interface PlotMargin { ...@@ -14,7 +15,7 @@ export interface PlotMargin {
const margin = ref<PlotMargin>({ const margin = ref<PlotMargin>({
marginTop: 50, marginTop: 50,
marginRight: 50, marginRight: 20,
marginBottom: 100, marginBottom: 100,
marginLeft: 40 marginLeft: 40
...@@ -62,9 +63,11 @@ onMounted(() => { ...@@ -62,9 +63,11 @@ onMounted(() => {
}) })
const plotContainer = ref(null)
const computedWidth = computed(() => { const computedWidth = computed(() => {
const screenWidth = toValue(width) > 1280 ? 1280 : toValue(width) const screenWidth = useElementSize(plotContainer, { width: 500, height: 0 }, { box: 'border-box' }).width.value
// const screenWidth = toValue(width) > 1280 ? 1280 : toValue(width)
return Math.max(screenWidth, 550); return Math.max(screenWidth, 550);
}); });
...@@ -225,7 +228,7 @@ async function fetchRefSeqTaxo() { ...@@ -225,7 +228,7 @@ async function fetchRefSeqTaxo() {
</v-card-text> </v-card-text>
<v-card variant="elevated" elevation="1" :loading="pending"> <v-card variant="elevated" elevation="1" :loading="pending">
<v-card-text> <v-card-text ref="plotContainer">
<v-row no-gutters> <v-row no-gutters>
<v-col> <v-col>
<v-select v-model="selectedTaxoRank" :items="taxoRanks" density="compact" <v-select v-model="selectedTaxoRank" :items="taxoRanks" density="compact"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment