@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.
@@ -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 but effective image sizing function
132
+ // Simple direct approach that correctly handles the info panel
133
133
  const updateImageSizes = useDebounceFn(() => {
134
- // Only target main image for sizing
134
+ // Get the main image
135
135
  const mainImage = document.querySelector('.image-display img') as HTMLImageElement
136
136
  if (!mainImage) return
137
137
 
138
- // Simple, direct calculation of available space
138
+ // Get exact measurements of all UI elements
139
139
  const topHeight = topControlsRef.value?.offsetHeight || 0
140
140
 
141
- // Always account for info panel height if it's visible
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
- // Add a small additional padding
147
- const bottomPadding = 16
146
+ // Standard padding
147
+ const padding = 24
148
148
 
149
- // Calculate total available height by subtracting all elements
150
- const availableHeight = windowHeight.value - topHeight - infoHeight - bottomPadding
149
+ // Calculate available height by subtracting ALL elements
150
+ const availableHeight = windowHeight.value - topHeight - infoHeight - padding
151
151
 
152
- // Apply size directly to fill available space
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
- ? '85vw'
160
- : `${windowWidth.value - sidebarWidth - 48}px`
160
+ ? '90vw'
161
+ : `${availableWidth}px`
161
162
  }, 50)
162
163
 
163
164
  // Modal controls
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "2.3.25",
3
+ "version": "2.3.27",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/fy-to/FWJS#readme",