@fy-/fws-vue 2.2.56 → 2.2.57
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 +14 -12
- package/package.json +1 -1
|
@@ -108,8 +108,7 @@ function setModal(value: boolean) {
|
|
|
108
108
|
}
|
|
109
109
|
isGalleryOpen.value = value
|
|
110
110
|
showControls.value = true
|
|
111
|
-
//
|
|
112
|
-
infoPanel.value = true
|
|
111
|
+
// Don't reset info panel state when opening/closing
|
|
113
112
|
}
|
|
114
113
|
|
|
115
114
|
function openGalleryImage(index: number | undefined) {
|
|
@@ -325,13 +324,12 @@ function handleBackdropClick(event: MouseEvent) {
|
|
|
325
324
|
}
|
|
326
325
|
|
|
327
326
|
watch(currentImage, () => {
|
|
328
|
-
//
|
|
329
|
-
infoPanel.value
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
})
|
|
327
|
+
// Only update the info height, don't change user's preference
|
|
328
|
+
if (infoPanel.value) {
|
|
329
|
+
nextTick(() => {
|
|
330
|
+
updateInfoHeight()
|
|
331
|
+
})
|
|
332
|
+
}
|
|
335
333
|
})
|
|
336
334
|
|
|
337
335
|
// Update CSS variable with info panel height
|
|
@@ -351,12 +349,16 @@ onMounted(() => {
|
|
|
351
349
|
eventBus.on(`${props.id}Gallery`, openGalleryImage)
|
|
352
350
|
eventBus.on(`${props.id}GalleryClose`, closeGallery)
|
|
353
351
|
|
|
354
|
-
// Initialize info height once mounted
|
|
355
|
-
|
|
352
|
+
// Initialize info height once mounted (only if info panel is shown)
|
|
353
|
+
if (infoPanel.value) {
|
|
354
|
+
updateInfoHeight()
|
|
355
|
+
}
|
|
356
356
|
|
|
357
357
|
// Set up a resize observer to track info panel height changes
|
|
358
358
|
const resizeObserver = new ResizeObserver(() => {
|
|
359
|
-
|
|
359
|
+
if (infoPanel.value) {
|
|
360
|
+
updateInfoHeight()
|
|
361
|
+
}
|
|
360
362
|
})
|
|
361
363
|
|
|
362
364
|
const infoElement = document.querySelector('.info-panel-slot')
|