()
| 260 | |
| 261 | // Optimized zoom indicator |
| 262 | const showZoomLevel = () => { |
| 263 | zoomIndicator.textContent = `${transformState.scale.toFixed(1)}x`; |
| 264 | zoomIndicator.style.opacity = '1'; |
| 265 | |
| 266 | if (zoomIndicator.timeoutId) clearTimeout(zoomIndicator.timeoutId); |
| 267 | |
| 268 | zoomIndicator.timeoutId = setTimeout(() => { |
| 269 | zoomIndicator.style.opacity = '0'; |
| 270 | }, 1000); |
| 271 | }; |
| 272 | |
| 273 | // Reset handler with animation frame |
| 274 | const resetZoom = () => { |