francoischalifour / medium-zoom

🔎🖼 A JavaScript library for zooming images like Medium

Home Page:https://medium-zoom.francoischalifour.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image being centered to the height of page height and not viewport height

mckeever02 opened this issue · comments

I noticed something that I think is related to the fix implemented for Issue #75

In this issue the code was changed from:

width: window.innerWidth,
height: window.innerHeight, 

to:

width: document.documentElement.clientWidth,
 height: document.documentElement.clientHeight,

However, this leads to the image (for me) being displayed off of the screen as it gets positioned to the height of the document and not the screen. When I change it back to window.innerHeight it works correctly.

Can you share screenshots of how this works better in your case?