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

Setting Zoom Level causes issues #108

Open
Airn5475 opened this issue Aug 20, 2018 · 0 comments
Open

Setting Zoom Level causes issues #108

Airn5475 opened this issue Aug 20, 2018 · 0 comments

Comments

@Airn5475
Copy link

I started having issues with ez-plus in my app with the initial zoom of a picture being jacked up as compared to the zoom that happens after clicking on a gallery photo. Able to reproduce using the code found in the examples...which doesn't match the code displayed. (Please update your example code, many typos!)

I've narrowed it down to the zoomLevel setting. If I comment it out, everything seems to be fine, except for the fact that the zoom isn't at the level I want.

<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script> 
<script type="text/javascript" src="https://cdn.rawgit.com/igorlino/elevatezoom-plus/1.1.17/src/jquery.ez-plus.js"></script>
</head>
<body>
    <img class="zoom-img" id="zoom_03" src="images/small/image1.jpg" data-zoom-image="images/large/image1.jpg" style="position: absolute; width: 414px; height: 274px;">
    <div id="gallery_01">
        <a href="#" data-image="images/small/image1.jpg" data-zoom-image="images/large/image1.jpg" class="active">
            <img src="images/thumb/image1.jpg"/>
        </a>
        <a href="#" data-image="images/small/image2.jpg" data-zoom-image="images/large/image2.jpg">
            <img src="images/thumb/image2.jpg"/>
        </a>
        <a href="#" data-image="images/small/image3.jpg" data-zoom-image="images/large/image3.jpg">
            <img src="images/thumb/image3.jpg"/>
        </a>
        <a href="#" data-image="images/small/image4.jpg" data-zoom-image="images/large/image4.jpg">
            <img src="images/thumb/image4.jpg"/>
        </a>
    </div>
	
    <script type="text/javascript">
        $(document).ready(function () {
                $("#zoom_03").ezPlus({
                        gallery: 'gallery_01',
                        cursor: 'crosshair',
                        galleryActiveClass: "active",
                        imageCrossfade: true,
                        zoomType: 'window',
                        zoomWindowWidth: 300,
                        zoomWindowHeight: 300,
                        zoomLevel: 3,
                        scrollZoom: true,
		        responsive: true
                });

                $("#zoom_03").bind("click", function (e) {
                        var ez = $('#zoom_03').data('ezPlus');
			ez.closeAll(); //NEW: This function force hides the lens, tint and window
			//$.fancyboxPlus(ez.getGalleryList());
			return false;
                });
        });
    </script>
</body>
</html>
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

1 participant