File tree 1 file changed +6
-8
lines changed
map/client/components/stickies
1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 26
26
import { computed , ref } from ' vue'
27
27
import { useCurrentActivity } from ' ../../../../core/client/composables'
28
28
29
- // ==PROPS==
29
+ // Props
30
30
const props = defineProps ({
31
31
vertical: {
32
32
type: Boolean ,
@@ -50,11 +50,9 @@ const props = defineProps({
50
50
}
51
51
})
52
52
53
- // ==REFS==
54
- const sliderVal = ref (0 )
55
-
56
- // ==MISC HOOKS==
53
+ // Data
57
54
const { CurrentActivity } = useCurrentActivity ()
55
+ const sliderVal = ref (0 )
58
56
59
57
// ==COMPUTED==
60
58
const isVisible = computed (() => sliderValues .value ? sliderValues .value .length > 0 : (sliderMinValue .value !== undefined && sliderMaxValue .value !== undefined ))
@@ -66,14 +64,14 @@ const sliderMaxValue = computed(() => _.get(CurrentActivity.value.selectableLeve
66
64
const sliderInterval = computed (() => _ .get (CurrentActivity .value .selectableLevels , ' range.interval' , 1 ))
67
65
68
66
// ==MISC FUNCTIONS==
69
- function onLevelChanged (level ) {
67
+ function onLevelChanged (level ) {
70
68
if (dataArray .value ) {
71
69
CurrentActivity .value .setSelectedLevel (dataArray .value [level])
72
70
} else {
73
71
CurrentActivity .value .setSelectedLevel (level)
74
72
}
75
73
}
76
- function getFormatedLevel (level ) {
74
+ function getFormatedLevel (level ) {
77
75
const unit = _ .get (CurrentActivity .value .selectableLevels , ' unit' )
78
76
return ` ${ level || CurrentActivity .value .selectedLevel } ${ unit} `
79
77
}
@@ -83,4 +81,4 @@ function getFormatedLevel(level) {
83
81
.k-level-slider {
84
82
border : 1px solid lightgrey ;
85
83
}
86
- </style >
84
+ </style >
You can’t perform that action at this time.
0 commit comments