Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
viz-layout-panel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MetaboHUB
web-components
viz-layout-panel
Commits
b80eb525
Commit
b80eb525
authored
4 months ago
by
Elora-V
Browse files
Options
Downloads
Patches
Plain Diff
slider for param
parent
33ed437a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/LayoutPanelComp.vue
+18
-21
18 additions, 21 deletions
src/components/LayoutPanelComp.vue
src/components/ParamComp/ParamSliderComp.vue
+24
-9
24 additions, 9 deletions
src/components/ParamComp/ParamSliderComp.vue
with
42 additions
and
30 deletions
src/components/LayoutPanelComp.vue
+
18
−
21
View file @
b80eb525
...
...
@@ -30,17 +30,12 @@
<div
class=
"ma-3"
>
<ParamSlider
v-model=
"parameters.number1"
:choices=
"choices"
/>
<ParamNumber
name=
"Base Node Spacing :"
v-model=
"parameters.test"
unit=
"nodes"
>
</ParamNumber>
<ParamSlider
v-model=
"parameters.number1"
name=
"Node proximity"
:choices=
"choicesNodeSpacing"
/>
<HelpText
:show-help=
"showHelp"
>
S
pace between
rank of hierarchical layout
Vertical s
pace between
two nodes
</HelpText>
<h3
class=
"ma-3"
>
Steps
</h3>
<ParamSwitch
name=
"Take reaction reversibility into account"
v-model=
"parameters.boolean1"
/>
...
...
@@ -48,20 +43,16 @@
If true, both directions of reversible reaction are considered; otherwise, only the direction specified in the file is considered
</HelpText>
<ParamS
witch
name=
"Treatment of directed cycles"
v-model=
"parameters.boolean2
"
/>
<ParamS
lider
v-model=
"parameters.number2"
name=
"Side compound edges"
:choices=
"choicesEdgesSideCompounds
"
/>
<HelpText
:show-help=
"showHelp"
>
If true, directed cycles are arranged in a circle as much as possible
The length of the side compound edge is at most the minimum length of edges that are not connected to side compounds, as it should always be shorter
</HelpText>
<ParamNumber
name=
"Side compound edge length :"
v-model=
"parameters.test1"
>
</ParamNumber>
<ParamSwitch
name=
"Treatment of directed cycles"
v-model=
"parameters.boolean2"
/>
<HelpText
:show-help=
"showHelp"
>
The length of the side compound edge is proportional to the minimum length of edges that are not connected to side compounds
If true, directed cycles are arranged in a circle as much as possible
</HelpText>
...
</div>
...
...
@@ -170,15 +161,21 @@ onMounted(() => {
///////////////////////////////////////////////////////////////////
//---------------------------- Parameters -------------------------
const
defaultParameters
=
{
test
:
1
0
,
number1
:
1
,
test1
:
1
/
3
,
test2
:
"
test2Default
"
,
boolean1
:
true
,
boolean2
:
true
};
const
defaultParameters
=
{
number2
:
0
,
number1
:
1
,
boolean1
:
true
,
boolean2
:
true
};
const
parameters
=
ref
({...
defaultParameters
});
const
choices
:
typeChoiceSlider
=
{
0
:
"
small
"
,
const
choicesNodeSpacing
:
typeChoiceSlider
=
{
0
:
"
close
"
,
1
:
"
moderate
"
,
2
:
"
distant
"
};
const
choicesEdgesSideCompounds
:
typeChoiceSlider
=
{
0
:
"
short
"
,
1
:
"
medium
"
,
2
:
"
l
arge
"
}
2
:
"
l
ong
"
}
;
///////////////////////////////////////////////////////////////////
//---------------------------- Functions -------------------------
...
...
This diff is collapsed.
Click to expand it.
src/components/ParamComp/ParamSliderComp.vue
+
24
−
9
View file @
b80eb525
<
template
>
<v-row>
<v-col
class=
"pa-12"
>
<div>
<div
class=
"text-body-1"
>
{{
name
}}
:
</div>
<div
class=
"d-flex justify-center mx-auto w-80"
>
<v-slider
v-model=
"size"
:max=
"numberChoice-1"
...
...
@@ -9,8 +14,9 @@
step=
"1"
tick-size=
"2"
></v-slider>
</v-col>
</v-row>
</div>
</div>
</
template
>
...
...
@@ -23,10 +29,14 @@ import type { PropType } from 'vue'
// Props (from parent to child component)
const
props
=
defineProps
({
choices
:
{
type
:
Object
as
PropType
<
typeChoiceSlider
>
,
required
:
true
}
name
:
{
type
:
String
,
required
:
true
},
choices
:
{
type
:
Object
as
PropType
<
typeChoiceSlider
>
,
required
:
true
}
});
//---------------------------- Get Set Value -------------------------
...
...
@@ -38,5 +48,10 @@ const size=defineModel({type:Number});
const
numberChoice
:
number
=
Object
.
keys
(
props
.
choices
).
length
;
</
script
>
</
script
>
\ No newline at end of file
<
style
scoped
>
.w-80
{
width
:
80%
;
}
</
style
>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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