jaukia / zoomooz

An easy-to-use jQuery plugin for making zooming web pages.
http://janne.aukia.com/zoomooz/
1.79k stars 275 forks source link

looking for a reset state button #126

Open lambdaka opened 6 years ago

lambdaka commented 6 years ago

Hi thanks for the plugin, I looked for a way to make a reset button.. I manage to make it working on an exemple without using a container by using $("body").zoomTo();

But i f I use the two divs zoomViewport and zoomContainer as container the button doesn't work. i tried with $(".zoomViewport").zoomTo(); and $(".zoomContainer").zoomTo(); but no luck.. i'ts zomming out but it's zooming out to much !

Is ther a way of using a choosen container and make a reset state button..?

Thanks !

lambdaka commented 6 years ago

SO I manage to do sometnhing by adding this jquery.zoomooz.js at line 1536

` line 1536

    $('.reset').on("click", function(evt) {
        if(settings.closeclick && zoomTarget.hasClass("selectedZoomTarget")) {
            settings.root.click();
        } else {
            settings.root.click();
        }
        evt.stopPropagation();
    });

`

hope that will help someone else !