Skip to content

Commit ea32ef6

Browse files
committed
UX: Change thumbnail size calculation for improved performance #1307
Signed-off-by: Michael Mayer <michael@photoprism.app>
1 parent cb659dd commit ea32ef6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

frontend/src/common/util.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,13 +609,13 @@ export default class $util {
609609
}
610610
}
611611

612-
static thumbSize(pixelsWidth, pixelsHeight) {
612+
static thumbSize(viewportWidth, viewportHeight) {
613613
const thumbs = $config.values.thumbs;
614614

615615
for (let i = 0; i < thumbs.length; i++) {
616616
let t = thumbs[i];
617617

618-
if (t.w >= pixelsWidth && t.h >= pixelsHeight) {
618+
if (t.w >= viewportWidth || t.h >= viewportHeight) {
619619
return t.size;
620620
}
621621
}

frontend/src/component/lightbox.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1981,7 +1981,7 @@ export default {
19811981
}
19821982
19831983
// Do not proceed unless the image is zoomed to near its intrinsic (natural) size.
1984-
if (zoomLevel < 0.9) {
1984+
if (zoomLevel < 0.95) {
19851985
return;
19861986
}
19871987

0 commit comments

Comments
 (0)