From e0ed7d24edf4aee86b927dcf48742cc2281a7f6d Mon Sep 17 00:00:00 2001 From: Remi PLANEL <rplanel@pasteur.fr> Date: Sat, 23 Dec 2023 21:34:17 +0100 Subject: [PATCH] dynamic width --- components/content/RefseqDb.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/content/RefseqDb.vue b/components/content/RefseqDb.vue index d7d55b2f..0219d615 100644 --- a/components/content/RefseqDb.vue +++ b/components/content/RefseqDb.vue @@ -69,6 +69,8 @@ const computedWidth = computed(() => { return Math.max(currentWidth, 550); }); + + const allHits: Ref<Record<string, any> | undefined> = ref(undefined) onMounted(async () => { const params = { @@ -193,12 +195,10 @@ function namesToAccessionChips(names: string[]) { } const systemPanel: Ref<string[]> = ref([]) const layoutPlot: Ref<string> = ref("grid") - const binPlotOptions = ref({ marginLeft: 150, marginBottom: 200, padding: 0, - width: 1920, grid: true, x: { tickRotate: 90, tip: true, }, @@ -209,6 +209,8 @@ const binPlotDataOptions = computed(() => { const toValueAllHits = toValue(allHits) return toValueAllHits?.hits?.length > 0 ? { ...binPlotOptions.value, + width: width.value, + color: { ...binPlotOptions.value.color, type: scaleType.value -- GitLab