@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.
@@ -108,8 +108,7 @@ function setModal(value: boolean) {
108
108
  }
109
109
  isGalleryOpen.value = value
110
110
  showControls.value = true
111
- // Keep info panel open by default
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
- // Keep info panel open when image changes
329
- infoPanel.value = true
330
-
331
- // Update info height after image changes
332
- nextTick(() => {
333
- updateInfoHeight()
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
- updateInfoHeight()
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
- updateInfoHeight()
359
+ if (infoPanel.value) {
360
+ updateInfoHeight()
361
+ }
360
362
  })
361
363
 
362
364
  const infoElement = document.querySelector('.info-panel-slot')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "2.2.56",
3
+ "version": "2.2.57",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/fy-to/FWJS#readme",