@@ -46,23 +46,19 @@ const placeBall = (team: Team) => {
46
46
47
47
const disable = computed (() => {
48
48
return store .matchState .command ?.type !== Command_Type .STOP
49
- || ! store .matchState .stage
50
- || isPausedStage (store .matchState .stage )
49
+ || ! store .matchState .stage
50
+ || isPausedStage (store .matchState .stage )
51
51
})
52
52
</script >
53
53
54
54
<template >
55
- <div class =" row" >
56
- <ControlButton class =" col-grow" label =" Place ball"
57
- v-for =" team in [Team.YELLOW, Team.BLUE]"
58
- :key =" team"
59
- :disable =" disable"
60
- :action =" () => placeBall(team)"
61
- :team =" team"
62
- />
55
+ <div class =" row justify-evenly q-mt-md" >
56
+ <ControlButton label =" Reset sliders to current ball position"
57
+ :disable =" false"
58
+ :action =" resetBallPos" />
63
59
</div >
64
60
65
- <div class =" row wrap justify-evenly q-mt-md" >
61
+ <div class =" row justify-evenly q-mt-md" >
66
62
<q-input
67
63
input-class =" text-center"
68
64
dense
@@ -87,14 +83,14 @@ const disable = computed(() => {
87
83
</q-item-section >
88
84
<q-item-section >
89
85
<q-slider
90
- v-model =" newBallPos.x"
91
- :min =" -minMaxX"
92
- :max =" minMaxX"
93
- :step =" 0.1"
94
- selection-color =" transparent"
95
- label
96
- :label-value =" newBallPos.x + ' m'"
97
- label-always
86
+ v-model =" newBallPos.x"
87
+ :min =" -minMaxX"
88
+ :max =" minMaxX"
89
+ :step =" 0.1"
90
+ selection-color =" transparent"
91
+ label
92
+ :label-value =" newBallPos.x + ' m'"
93
+ label-always
98
94
/>
99
95
<q-slider class =" slider-current"
100
96
@@ -118,34 +114,38 @@ const disable = computed(() => {
118
114
</q-item-section >
119
115
<q-item-section >
120
116
<q-slider
121
- v-model =" curBallPos.y"
122
- :min =" -minMaxY"
123
- :max =" minMaxY"
124
- :step =" 0.1"
125
- selection-color =" transparent"
126
- color =" info"
127
- disable
117
+ v-model =" curBallPos.y"
118
+ :min =" -minMaxY"
119
+ :max =" minMaxY"
120
+ :step =" 0.1"
121
+ selection-color =" transparent"
122
+ color =" info"
123
+ disable
128
124
/>
129
125
<q-slider
130
- v-model =" newBallPos.y"
131
- :min =" -minMaxY"
132
- :max =" minMaxY"
133
- :step =" 0.1"
134
- selection-color =" transparent"
135
- label
136
- :label-value =" newBallPos.y + ' m'"
137
- label-always
138
- switch-label-side
126
+ v-model =" newBallPos.y"
127
+ :min =" -minMaxY"
128
+ :max =" minMaxY"
129
+ :step =" 0.1"
130
+ selection-color =" transparent"
131
+ label
132
+ :label-value =" newBallPos.y + ' m'"
133
+ label-always
134
+ switch-label-side
139
135
/>
140
136
</q-item-section >
141
137
<q-item-section avatar />
142
138
</q-item >
143
139
</div >
140
+ </div >
144
141
145
- <div class =" row wrap justify-evenly q-mt-md" >
146
- <ControlButton label =" Reset placement position"
147
- :disable =" false"
148
- :action =" resetBallPos" />
149
- </div >
142
+ <div class =" row justify-evenly q-mt-md" >
143
+ <ControlButton class =" col-grow" label =" Place ball"
144
+ v-for =" team in [Team.YELLOW, Team.BLUE]"
145
+ :key =" team"
146
+ :disable =" disable"
147
+ :action =" () => placeBall(team)"
148
+ :team =" team"
149
+ />
150
150
</div >
151
151
</template >
0 commit comments