From 05ef25a7a327d0db832e8b245fa90f8aec980ce2 Mon Sep 17 00:00:00 2001 From: ComfyUI Wiki Date: Tue, 3 Jun 2025 12:40:13 +0800 Subject: [PATCH] Update the Compare slider start position to the middle (#4052) --- .../templates/thumbnails/CompareSliderThumbnail.spec.ts | 2 +- src/components/templates/thumbnails/CompareSliderThumbnail.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/templates/thumbnails/CompareSliderThumbnail.spec.ts b/src/components/templates/thumbnails/CompareSliderThumbnail.spec.ts index 4a79a29ab..7d0fcc9c9 100644 --- a/src/components/templates/thumbnails/CompareSliderThumbnail.spec.ts +++ b/src/components/templates/thumbnails/CompareSliderThumbnail.spec.ts @@ -63,7 +63,7 @@ describe('CompareSliderThumbnail', () => { it('positions slider based on default value', () => { const wrapper = mountThumbnail() const divider = wrapper.find('.bg-white\\/30') - expect(divider.attributes('style')).toContain('left: 21%') + expect(divider.attributes('style')).toContain('left: 50%') }) it('passes isHovered prop to BaseThumbnail', () => { diff --git a/src/components/templates/thumbnails/CompareSliderThumbnail.vue b/src/components/templates/thumbnails/CompareSliderThumbnail.vue index 9327cb3cb..3a6d0e3a2 100644 --- a/src/components/templates/thumbnails/CompareSliderThumbnail.vue +++ b/src/components/templates/thumbnails/CompareSliderThumbnail.vue @@ -38,7 +38,7 @@ import { ref, watch } from 'vue' import BaseThumbnail from '@/components/templates/thumbnails/BaseThumbnail.vue' -const SLIDER_START_POSITION = 21 +const SLIDER_START_POSITION = 50 const { baseImageSrc, overlayImageSrc, isHovered, isVideo } = defineProps<{ baseImageSrc: string