Comments (9)
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.
+1
from zoomooz.
see line 1120 here:
https://github.com/3DComics/Interactive-Comics/blob/master/jquery.zoomooz.js
is using a custom stopfunction
from zoomooz.
adding this at line 1120 seems to work, although there is a slight delay
if( $(this).hasClass("selectedZoomTarget") ) {
$("body").zoomTo(settings);
}
from zoomooz.
I'll have to think about how to add this to zoomooz. Probably an optional setting for the zoomTarget, or something?
from zoomooz.
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.
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.
Right, I realized it with a custom function outside of the zoomooz script that was triggered when I had to zoom out.
from zoomooz.
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)
- HTML5 video is zoomed when zoomooz.js is included
- Viewport detection after Zoomooz scale
- Trouble using animationendcallback setting.
- Problemm selecting next object to zoom
- handle zoomtarget shape changes and position correctly
- closeclick not working
- once zoomed on zoomTarget, how to prevent re-zooming upon clicking a button
- Zoomooz is conflicting with Adobe Muse navigation
- Uncaught TypeError: Cannot read property 'zoomooz' of undefined HOT 1
- Missing license HOT 7
- Is it it possible to zoom away from center?
- looking for a reset state button HOT 1
- Cannot seem to use this within a Google Maps InfoWindow? HOT 1
- zoom on pdf is blurry
- transform-origin: center
- zoomViewport & zoomContainer are hogging the buttons between themselves
- replace onclick event by onhover
- How to use Zoomooz with ReactJs
- Zoom on a picture in a while loop is drunk HOT 4
- Zoom enabling with button HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zoomooz.