From 3eb7f4390825594b0eb0551bc6b5f2fc5366cf7b Mon Sep 17 00:00:00 2001 From: Amelia <77553571+Fesaa@users.noreply.github.com> Date: Wed, 11 Jun 2025 01:23:09 +0200 Subject: [PATCH] Fix the effect not being called --- .../infinite-scroller/infinite-scroller.component.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/UI/Web/src/app/manga-reader/_components/infinite-scroller/infinite-scroller.component.ts b/UI/Web/src/app/manga-reader/_components/infinite-scroller/infinite-scroller.component.ts index 9180cb532..bac640852 100644 --- a/UI/Web/src/app/manga-reader/_components/infinite-scroller/infinite-scroller.component.ts +++ b/UI/Web/src/app/manga-reader/_components/infinite-scroller/infinite-scroller.component.ts @@ -246,7 +246,6 @@ export class InfiniteScrollerComponent implements OnInit, OnChanges, OnDestroy, // Automatically updates when the breakpoint changes, or when reader settings changes this.widthOverride = computed(() => { - //console.log("updating widthOverride") const breakpoint = this.utilityService.activeUserBreakpoint(); const value = this.readerSettings().widthSlider; @@ -258,12 +257,11 @@ export class InfiniteScrollerComponent implements OnInit, OnChanges, OnDestroy, //perform jump so the page stays in view (NOT WORKING) effect(() => { - //console.log("width changing!") + const width = this.widthOverride(); // needs to be at the top for effect to work this.currentPageElem = this.document.querySelector('img#page-' + this.pageNum); if(!this.currentPageElem) return; - const width = this.widthOverride(); let images = Array.from(document.querySelectorAll('img[id^="page-"]')) as HTMLImageElement[]; images.forEach((img) => { this.renderer.setStyle(img, "width", width);