igorlino / elevatezoom-plus

Enhanced elevateZoom - A jQuery image zoom plugin
http://igorlino.github.io/elevatezoom-plus/
MIT License
162 stars 78 forks source link

Zoom Window Size Causes Buggy Window Position #119

Open angable opened 5 years ago

angable commented 5 years ago

I found that certain sizes will sometimes cause the zoomWindowPosition to not properly work.

For Example, I can easily use

$('img.formFillingPreview').ezPlus({
            zoomWindowWidth: 500,
            zoomWindowHeight: 300,
            zoomWindowPosition: 10,
            minZoomLevel: 1.2,
            borderColour: '#888',
            borderSize: 1,
        });

And it will work fine. The zoom magnify window shows up in the 10 position, it seems about the correct size and looks good.

However, if I change the sizing to this

$('img.formFillingPreview').ezPlus({
            zoomWindowWidth: 350,
            zoomWindowHeight: 200,
            zoomWindowPosition: 10,
            minZoomLevel: 1.2,
            borderColour: '#888',
            borderSize: 1,
       });

Suddenly the zoom magnify window is inside the image that is being zoomed into (img.formFillingPreview).