@fy-/fws-vue 2.3.25 → 2.3.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ui/DefaultGallery.vue +12 -11
- package/package.json +1 -1
|
@@ -129,35 +129,36 @@ const currentImage = computed(() => {
|
|
|
129
129
|
const imageCount = computed(() => props.images.length)
|
|
130
130
|
const currentIndex = computed(() => modelValue.value + 1)
|
|
131
131
|
|
|
132
|
-
// Simple
|
|
132
|
+
// Simple direct approach that correctly handles the info panel
|
|
133
133
|
const updateImageSizes = useDebounceFn(() => {
|
|
134
|
-
//
|
|
134
|
+
// Get the main image
|
|
135
135
|
const mainImage = document.querySelector('.image-display img') as HTMLImageElement
|
|
136
136
|
if (!mainImage) return
|
|
137
137
|
|
|
138
|
-
//
|
|
138
|
+
// Get exact measurements of all UI elements
|
|
139
139
|
const topHeight = topControlsRef.value?.offsetHeight || 0
|
|
140
140
|
|
|
141
|
-
// Always
|
|
141
|
+
// CRITICAL: Always include the info panel height when visible
|
|
142
142
|
const infoHeight = infoPanel.value && infoPanelRef.value
|
|
143
143
|
? infoPanelRef.value.offsetHeight
|
|
144
144
|
: 0
|
|
145
145
|
|
|
146
|
-
//
|
|
147
|
-
const
|
|
146
|
+
// Standard padding
|
|
147
|
+
const padding = 24
|
|
148
148
|
|
|
149
|
-
// Calculate
|
|
150
|
-
const availableHeight = windowHeight.value - topHeight - infoHeight -
|
|
149
|
+
// Calculate available height by subtracting ALL elements
|
|
150
|
+
const availableHeight = windowHeight.value - topHeight - infoHeight - padding
|
|
151
151
|
|
|
152
|
-
// Apply
|
|
152
|
+
// Apply the exact height constraint to the image
|
|
153
153
|
mainImage.style.maxHeight = `${availableHeight}px`
|
|
154
154
|
mainImage.style.width = 'auto'
|
|
155
155
|
|
|
156
156
|
// Handle width constraints
|
|
157
157
|
const sidebarWidth = sidePanel.value ? 256 : 0
|
|
158
|
+
const availableWidth = windowWidth.value - sidebarWidth - padding * 2
|
|
158
159
|
mainImage.style.maxWidth = windowWidth.value <= 768
|
|
159
|
-
? '
|
|
160
|
-
: `${
|
|
160
|
+
? '90vw'
|
|
161
|
+
: `${availableWidth}px`
|
|
161
162
|
}, 50)
|
|
162
163
|
|
|
163
164
|
// Modal controls
|