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
3dbb68c4
Commit
3dbb68c4
authored
3 months ago
by
Elora-V
Browse files
Options
Downloads
Patches
Plain Diff
debut on change
parent
9f4de68d
No related branches found
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
+38
-5
38 additions, 5 deletions
src/components/LayoutPanelComp.vue
src/components/ParamComp/ParamContinuousSliderComp.vue
+4
-0
4 additions, 0 deletions
src/components/ParamComp/ParamContinuousSliderComp.vue
with
42 additions
and
5 deletions
src/components/LayoutPanelComp.vue
+
38
−
5
View file @
3dbb68c4
...
...
@@ -65,13 +65,22 @@
<!--Spacing-->
<div
class=
"my-3"
>
<ParamContinuousSlider
name=
"Minimal horizontal spacing"
:min=
"5"
:max=
"300"
:step=
"5"
unit=
"px"
v-model=
"parameters.spacePixelHorizontalUser"
/>
<ParamContinuousSlider
name=
"Minimal horizontal spacing"
:min=
"5"
:max=
"300"
:step=
"5"
unit=
"px"
v-model=
"parameters.spacePixelHorizontalUser"
@
startSlider=
"sliderMovementOn()"
@
endSlider=
"sliderMovementOff()"
/>
<HelpText
:show-help=
"showHelp"
>
Minimal horizontal spacing between nodes for hierarchical layout
</HelpText>
</div>
<div
class=
"my-3"
>
<ParamContinuousSlider
name=
"Minimal vertical spacing"
:min=
"5"
:max=
"300"
:step=
"5"
unit=
"px"
v-model=
"parameters.spacePixelVerticalUser"
/>
<ParamContinuousSlider
name=
"Minimal vertical spacing"
:min=
"5"
:max=
"300"
:step=
"5"
unit=
"px"
v-model=
"parameters.spacePixelVerticalUser"
@
startSlider=
"sliderMovementOn()"
@
endSlider=
"sliderMovementOff()"
/>
<HelpText
:show-help=
"showHelp"
>
Minimal vertical spacing between nodes for hierarchical layout
</HelpText>
...
...
@@ -235,11 +244,35 @@ const mainChainChoices:typeChoiceSelect= Object.values(mainChain);
const
defaultParameters
:
userParamType
=
getDefaultUserParam
();
const
parameters
=
reactive
({...
defaultParameters
});
// start-end parameters slider movement
let
sliderMovement
:
Ref
<
boolean
>=
ref
(
false
);
function
sliderMovementOn
():
void
{
sliderMovement
.
value
=
true
;
}
function
sliderMovementOff
():
void
{
sliderMovement
.
value
=
false
;
console
.
log
(
"
stop
"
,
sliderMovement
);
}
// layout on change of parameters : (but if slider on)
watch
(
parameters
,
(
newValue
,
oldValue
)
=>
{
if
(
!
sliderMovement
.
value
){
// if change of parameters but no slider movement : apply layout
console
.
log
(
'
Parameters changed:
'
,
{
newValue
,
oldValue
});
},
{
deep
:
true
}
// Ensure it watches deeply
);
}
});
// layout on end of slider
watch
(
sliderMovement
,
(
newValue
,
oldValue
)
=>
{
if
(
!
sliderMovement
.
value
){
// if change of slider and end movement : apply layout
console
.
log
(
'
Parameters changed slider:
'
,
{
newValue
,
oldValue
});
}
});
///////////////////////////////////////////////////////////////////
...
...
This diff is collapsed.
Click to expand it.
src/components/ParamComp/ParamContinuousSliderComp.vue
+
4
−
0
View file @
3dbb68c4
...
...
@@ -13,6 +13,8 @@
tick-size=
"4"
thumb-size=
"15"
:hide-details=
"true"
@
start=
"emits('startSlider');"
@
end=
"emits('endSlider');"
>
<template
v-slot:append
>
<v-number-input
control-variant=
"stacked"
...
...
@@ -66,6 +68,8 @@ const props = defineProps({
});
const
emits
=
defineEmits
([
"
startSlider
"
,
"
endSlider
"
])
//---------------------------- Get Set Value -------------------------
const
size
=
defineModel
({
type
:
Number
});
...
...
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