Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Wiki
Manage
Activity
Members
Labels
Plan
Issues
53
Issue boards
Milestones
Wiki
Code
Merge requests
6
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MDM Lab
Wiki
Commits
7b08fd54
Commit
7b08fd54
authored
1 year ago
by
Remi PLANEL
Browse files
Options
Downloads
Patches
Plain Diff
compute width and height
parent
cc01be50
No related branches found
No related tags found
3 merge requests
!229
Draft: Modify all articles with article struct
,
!228
Uniq molstar plugin per page
,
!226
Resolve "Design of the structure section in a system's page"
Pipeline
#127248
waiting for manual action with stages
in 6 minutes and 42 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
components/content/MolstarPdbePlugin.vue
+1
-6
1 addition, 6 deletions
components/content/MolstarPdbePlugin.vue
components/content/PdbeMolstarPlugin.vue
+14
-0
14 additions, 0 deletions
components/content/PdbeMolstarPlugin.vue
with
15 additions
and
6 deletions
components/content/MolstarPdbePlugin.vue
+
1
−
6
View file @
7b08fd54
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
components/content/PdbeMolstarPlugin.vue
+
14
−
0
View file @
7b08fd54
<
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
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment