|
4 | 4 | v-model="controlPanels" |
5 | 5 | multiple |
6 | 6 | variant="accordion" |
7 | | - class="annotation-panels paint-process-panels" |
| 7 | + class="annotation-panels" |
8 | 8 | > |
9 | 9 | <v-expansion-panel :value="PAINT_PANEL"> |
10 | 10 | <v-expansion-panel-title> |
11 | 11 | <v-icon class="annotation-panel-icon">mdi-brush</v-icon> |
12 | 12 | Paint |
13 | 13 | </v-expansion-panel-title> |
14 | | - <v-expansion-panel-text class="control-panel-body"> |
| 14 | + <v-expansion-panel-text> |
15 | 15 | <v-row |
16 | 16 | no-gutters |
17 | 17 | align="center" |
|
176 | 176 | </div> |
177 | 177 | <div class="paint-switches mb-2"> |
178 | 178 | <div class="d-flex align-center"> |
179 | | - <span class="control-label text-body-2 text-no-wrap"> |
| 179 | + <label |
| 180 | + :for="overlapSwitchId" |
| 181 | + class="control-label text-body-2 text-no-wrap cursor-pointer" |
| 182 | + > |
180 | 183 | <v-icon size="small">mdi-set-center</v-icon>Allow Overlap |
181 | | - </span> |
| 184 | + </label> |
182 | 185 | <v-switch |
| 186 | + :id="overlapSwitchId" |
183 | 187 | aria-label="Allow Overlap" |
184 | 188 | v-model="allowOverlap" |
185 | 189 | color="primary" |
|
197 | 201 | class="d-flex align-center" |
198 | 202 | :tabindex="brushDisabledReason ? 0 : undefined" |
199 | 203 | > |
200 | | - <span class="control-label text-body-2 text-no-wrap"> |
| 204 | + <label |
| 205 | + :for="syncSwitchId" |
| 206 | + :class="[ |
| 207 | + 'control-label text-body-2 text-no-wrap', |
| 208 | + { 'cursor-pointer': !brushDisabledReason }, |
| 209 | + ]" |
| 210 | + > |
201 | 211 | <v-icon size="small">mdi-link-variant</v-icon>Sync Views |
202 | | - </span> |
| 212 | + </label> |
203 | 213 | <v-tooltip |
204 | 214 | :eager="false" |
205 | 215 | :disabled="!brushDisabledReason" |
|
209 | 219 | {{ brushDisabledReason }} |
210 | 220 | </v-tooltip> |
211 | 221 | <v-switch |
| 222 | + :id="syncSwitchId" |
212 | 223 | aria-label="Sync Views" |
213 | 224 | :disabled="!!brushDisabledReason" |
214 | 225 | v-model="crossPlaneSync" |
|
227 | 238 | <v-icon class="annotation-panel-icon">mdi-cogs</v-icon> |
228 | 239 | Process |
229 | 240 | </v-expansion-panel-title> |
230 | | - <v-expansion-panel-text class="control-panel-body"> |
| 241 | + <v-expansion-panel-text> |
231 | 242 | <ProcessControls /> |
232 | 243 | </v-expansion-panel-text> |
233 | 244 | </v-expansion-panel> |
|
236 | 247 | </template> |
237 | 248 |
|
238 | 249 | <script setup lang="ts"> |
239 | | -import { computed, ref, watch } from 'vue'; |
| 250 | +import { computed, ref, useId, watch } from 'vue'; |
240 | 251 | import { storeToRefs } from 'pinia'; |
241 | 252 | import { PaintMode } from '@/src/core/tools/paint'; |
242 | 253 | import { usePaintInteractionMode } from '@/src/segmentation/composables/usePaintInteractionMode'; |
@@ -286,6 +297,8 @@ const { |
286 | 297 | crossPlaneSync, |
287 | 298 | } = storeToRefs(paintStore); |
288 | 299 | const { allowOverlap } = storeToRefs(useSegmentationStore()); |
| 300 | +const overlapSwitchId = useId(); |
| 301 | +const syncSwitchId = useId(); |
289 | 302 | // Allow Overlap stays live: it also governs a polygon's Rasterize. |
290 | 303 | const brushDisabledReason = computed( |
291 | 304 | () => |
|
0 commit comments