Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two Issues: 1) Zoom-in shows content from cache. 2) Zoom-out using mouse wheel got opposite #83

Open
TLKG opened this issue Mar 28, 2021 · 2 comments

Comments

@TLKG
Copy link

TLKG commented Mar 28, 2021

Have a list of books, click on one will toggle to details of a book including book cover.

  1. While lib-ngx-image loads dynamic img successfully, zoom-in always shows content of first book. For example, click on any book, say book A from the list into reviewing and zooming book cover, then from now on review any other books the magnifier content is always book A.
    Tried the timer fix on Image zoom not working for dynamic data #36 didn't help. Guess because List-of-Books and Detail-of-Book are in the same component and are toggled using [hidden].
<!-- book detail section including book cover img -->
<div [hidden]="!Detail">
  <lib-ngx-image-zoom [thumbImage]=myCover [magnification]="1" 
            [enableScrollZoom]="true"
            [enableLens]="true"
            [lensWidth]="200">
   </lib-ngx-image-zoom>
</div>

<!-- list of book -->
<div [hidden]="Detail">
  ...
</div>
showBookDetailIncludingCover(book: any)
{
  this.myCover = null;  // try reset and clear, still the same.
  this.myCover = book.imgSrc;
  this.Detail = true;  // setTimeout() didn't help.
  ...
}

Is it any way to reset the content of magnifier?

  1. Wheeling out (zoom-out) indeed got the max zoom-in, then zoom-out.

Thank you.

@mstojevski
Copy link

mstojevski commented May 16, 2021

You should also provide fullImage even its same as thumbImage, so both thumbImage and magnifer updates on change.

<lib-ngx-image-zoom [thumbImage]=myCover [magnification]="1" [enableScrollZoom]="true" [fullImage]="myCover" // Add this [enableLens]="true" [lensWidth]="200"> </lib-ngx-image-zoom>

@TLKG
Copy link
Author

TLKG commented May 16, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants