mark-rolich / Magnifier.js

Javascript library enabling magnifying glass effect on an images
MIT License
831 stars 193 forks source link

Lens background-image distorted #35

Open nxaxg opened 3 years ago

nxaxg commented 3 years ago

The image of the lens setted as the lens background-image seems to distort due to css classes at image to be sized.

Captura de Pantalla 2021-04-06 a la(s) 13 17 08 Captura de Pantalla 2021-04-06 a la(s) 13 17 41

Image seems to work properly if thus classes is removed (as well as the css properties of the class) as the image uses the real width x height of the file (overflows from red border-box line)

Captura de Pantalla 2021-04-06 a la(s) 13 18 44 Captura de Pantalla 2021-04-06 a la(s) 13 19 00

nxaxg commented 3 years ago

Ok, so, after checking issue #3 i've set the background size using the thumb.width and thumb.height

lets see how it works.

Captura de Pantalla 2021-04-06 a la(s) 13 34 42