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

compute width and height

parent cc01be50
No related branches found
No related tags found
3 merge requests!229Draft: Modify all articles with article struct,!228Uniq molstar plugin per page,!226Resolve "Design of the structure section in a system's page"
Pipeline #127248 waiting for manual action with stages
in 6 minutes and 42 seconds
......@@ -2,10 +2,6 @@
import { withTrailingSlash, withLeadingSlash, joinURL } from 'ufo'
import { useRuntimeConfig, computed } from '#imports'
import * as d3 from "d3";
import * as Plot from "@observablehq/plot";
import PlotFigure from "~/components/PlotFigure";
import { useDisplay } from "vuetify";
export interface Props {
......@@ -18,7 +14,7 @@ export interface Props {
const { mobile } = useDisplay()
const { mobile, width, height } = useDisplay()
const refinedDataUrls = computed(() => {
function refinedUrl(url: string) {
......@@ -59,7 +55,6 @@ const props = withDefaults(defineProps<Props>(), {
dataUrl: undefined
})
const { width, height } = useDisplay()
const maxWidth = ref(1500)
......
<script setup lang="ts">
import { withTrailingSlash, withLeadingSlash, joinURL } from 'ufo'
import { useRuntimeConfig, computed, toValue } from '#imports'
import { useDisplay } from "vuetify";
import type { MaybeRef } from "vue"
import FoldseekDialog from '../FoldseekDialog.vue'
const { mobile, width, height } = useDisplay()
useHead({
link: [
{
......@@ -48,6 +53,15 @@ const selectedPdb: Ref<string | null> = ref(null)
const structureToDownload: Ref<string | null> = ref(null)
const computedWidth = computed(() => {
// if (toValue(width) > toValue(maxWidth)) return toValue(maxWidth) / 1.5
return toValue(width) / 1.5
})
const computedHeight = computed(() => {
return height.value - 250
})
function refinedUrl(url: string) {
if (url?.startsWith('/') && !url.startsWith('//')) {
const _base = withLeadingSlash(withTrailingSlash(useRuntimeConfig().app.baseURL))
......
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