Giter Club home page Giter Club logo

Comments (9)

NoseBuddy avatar NoseBuddy commented on August 11, 2024 1

The solution from brandoniscool worked fine - i only had to put his code to an other linenumber ( it was line 1157 i think linenumbers changed in the newer versions)

So its placed inside the clickTarget function:

clickTarget.click(function(evt) {
zoomTarget.zoomTo(settings);
evt.stopPropagation();
//// new zoomout function
if( $(this).hasClass("selectedZoomTarget") ) {
$("body").zoomTo(settings);
}
//// new zoomout function
});

from zoomooz.

brandoniscool avatar brandoniscool commented on August 11, 2024

+1

from zoomooz.

DanielRuf avatar DanielRuf commented on August 11, 2024

see line 1120 here:
https://github.com/3DComics/Interactive-Comics/blob/master/jquery.zoomooz.js

is using a custom stopfunction

from zoomooz.

brandoniscool avatar brandoniscool commented on August 11, 2024

adding this at line 1120 seems to work, although there is a slight delay

if( $(this).hasClass("selectedZoomTarget") ) {
$("body").zoomTo(settings);
}

from zoomooz.

jaukia avatar jaukia commented on August 11, 2024

I'll have to think about how to add this to zoomooz. Probably an optional setting for the zoomTarget, or something?

from zoomooz.

DanielRuf avatar DanielRuf commented on August 11, 2024

sure

see also my updated version here (starting at line 212) https://github.com/3DComics/Interactive-Comics/blob/master/static.html

removed the code from jquery.zoomooz.js and instead fired .zoomto() manually with the stopfunction

from zoomooz.

mynameistechno avatar mynameistechno commented on August 11, 2024

I agree this would be useful. Using zoomTarget sometimes doesn't give you enough control and you need to use zoomTo. Having a zoomOut would be nice. Currently I just clear out the translate on the root element.

from zoomooz.

DanielRuf avatar DanielRuf commented on August 11, 2024

Right, I realized it with a custom function outside of the zoomooz script that was triggered when I had to zoom out.

from zoomooz.

jaukia avatar jaukia commented on August 11, 2024

Added the zoom out functionality, just add data-closeclick="true" to the zoomTarget. Let me know if this works for you!

from zoomooz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.