A photo manager for VRChat.

Fixed resizing images (again)

phaz.uk 820aafe9 9359fd41

verified
Changed files
+9 -7
src
Components
+1 -1
build-release.sh
··· 1 #!/bin/bash 2 3 - VERSION=0.2.7 4 5 # Linux builds 6 NO_STRIP=true pnpm tauri build
··· 1 #!/bin/bash 2 3 + VERSION=0.2.7-hot1 4 5 # Linux builds 6 NO_STRIP=true pnpm tauri build
+4 -1
changelog
··· 127 - Fixed image resizing when window is thinner than image 128 - Fixed closing settings with keybinds 129 - Fixed the behaviour of changing the photo path 130 - - Fixed loading photos in folders that aren't VRChat folders
··· 127 - Fixed image resizing when window is thinner than image 128 - Fixed closing settings with keybinds 129 - Fixed the behaviour of changing the photo path 130 + - Fixed loading photos in folders that aren't VRChat folders 131 + 132 + Hotfix 1: 133 + - Fixed resizing images (again)
+4 -5
src/Components/PhotoViewer.tsx
··· 154 let dstWidth; 155 let dstHeight; 156 157 - let imgHeight = imageViewer.height; 158 - let imgWidth = imageViewer.width; 159 160 if( 161 imgWidth / window.innerWidth < ··· 178 utils.set(photoLayerManager, { translateY: '20px', opacity: 0, display: 'none' }); 179 180 window.addEventListener('keyup', switchPhotoWithKey); 181 - 182 - resizeImage(); 183 - 184 window.addEventListener('resize', () => resizeImage()); 185 186 let contextMenuOpen = false; ··· 262 if(photo){ 263 imageViewer.src = (window.OS === "windows" ? "http://photo.localhost/" : 'photo://localhost/') + window.PhotoViewerManager.CurrentPhoto()?.path.split('\\').join('/') + "?full"; 264 imageViewer.crossOrigin = 'anonymous'; 265 266 animate(imageViewer, { 267 opacity: 1,
··· 154 let dstWidth; 155 let dstHeight; 156 157 + let imgHeight = imageViewer.naturalHeight; 158 + let imgWidth = imageViewer.naturalWidth; 159 160 if( 161 imgWidth / window.innerWidth < ··· 178 utils.set(photoLayerManager, { translateY: '20px', opacity: 0, display: 'none' }); 179 180 window.addEventListener('keyup', switchPhotoWithKey); 181 window.addEventListener('resize', () => resizeImage()); 182 183 let contextMenuOpen = false; ··· 259 if(photo){ 260 imageViewer.src = (window.OS === "windows" ? "http://photo.localhost/" : 'photo://localhost/') + window.PhotoViewerManager.CurrentPhoto()?.path.split('\\').join('/') + "?full"; 261 imageViewer.crossOrigin = 'anonymous'; 262 + 263 + imageViewer.onload = () => { resizeImage(); } 264 265 animate(imageViewer, { 266 opacity: 1,