Skip to content

Commit

Permalink
ps-image: prevent repeat loading of full res
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Patil <radialapps@gmail.com>
  • Loading branch information
pulsejet committed Sep 30, 2023
1 parent a78aa31 commit 58220ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/viewer/PsImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ export default class ImageContentSetup {
const img = slide.holderElement?.querySelector('.ximg:not(.ximg--full)') as HTMLImageElement;
if (!img) return;

// Don't load again
slide.data.highSrcCond = 'never';

// Load full image at secondary zoom level
img.classList.add('ximg--full');

Expand All @@ -114,9 +117,6 @@ export default class ImageContentSetup {

// Set src
img.src = blobSrc;

// Don't load again
slide.data.highSrcCond = 'never';
})
.finally(() => {
this.loading--;
Expand Down

0 comments on commit 58220ec

Please sign in to comment.