Giter Club home page Giter Club logo

Comments (19)

DanielRuf avatar DanielRuf commented on August 11, 2024

there are no scrollbars so no scrolling

then change in your sourcecode the click event to something other you need or fire the zoomto function manually

from zoomooz.

jakov avatar jakov commented on August 11, 2024

there are no scrollbars so no scrolling

Yes, but does it have to be like that or is it possible to enable the scrollbars? I have no issues to fire the function, but i would like to be able to zoom on one element and then scroll around with the same zoom level, e.g. when reading an article, it often has only very little width due to navigation menus or advertisement etc. After zooming to the first paragraph I want to normally scroll down to read the rest of the article, just like if i had manually zoomed in on the element.

from zoomooz.

DanielRuf avatar DanielRuf commented on August 11, 2024

hm wouldnt be this be better? : http://www.professorcloud.com/mainsite/cloud-zoom.htm innerzoom? so you want it like this but with the features of zoomooz?

from zoomooz.

jakov avatar jakov commented on August 11, 2024

Not exactly, I would want to zoom on an element. The result should be quasi the same as if I would fiddle around with my browsers zoom to have that element in my viewport. Safari can handle this better through its "smart zoom" where you double tap the element: safari then sets its zoom to fit that element, but you can pan or zoom in/out like if you manually zoomed in on that element.

from zoomooz.

jaukia avatar jaukia commented on August 11, 2024

Adding this would not be trivial, since when zooming, the page size does not change, so there is no way of adusting the page scrollbars to scroll the whole zoomed content, as far as I know. Maybe one could add an huge element to dom somehow that is as large as the whole zoomed content area, but it gets somewhat tricky.

Probably making some kind of drag-scrolling of the page would be easier than actual scrollbars. Or then one could hack own scrollbars, that are not the real browser scrollbars.

Sorry for the impresise descriptions, if I have time at some point, I could try to think of this, but unfortuntely I am currently quite busy with work & other stuff...

from zoomooz.

jakov avatar jakov commented on August 11, 2024

Very sorry to hear this; but i will try to find another way. Thanks for your responses!

from zoomooz.

mynameistechno avatar mynameistechno commented on August 11, 2024

I have been able to get scrollbars added to the page when zoomed in by adding a huge image as a background (pretty much like @jaukia suggested -> add a huge element to the dom). I can then scroll around when zoomed in with no problems. The only problem though is that once you scroll around and click on another zoomable element, it doesn't correctly center on the new element since it doesn't take scrolling into account. @jaukia, any ideas on how to mitigate this? could the scroll offsets be calculated and subtracted from the translations? thanks

from zoomooz.

jaukia avatar jaukia commented on August 11, 2024

Handling the scrolling is a bit hacky in Zoomooz and bolting the tweaks on top of it might be a bit difficult. You could try adding "window.scrollTo(0,0);" when Zooming to the second level elements. But this would probably cause some artifacts.

from zoomooz.

mynameistechno avatar mynameistechno commented on August 11, 2024

Yeah I tried that ;) definitely didn't work great. I removed the scrolling, will look at adding drag scroll when I get a chance. Thanks

Sent from my iPhone

On Sep 29, 2012, at 4:06 AM, jaukia [email protected] wrote:

Handling the scrolling is a bit hacky in Zoomooz and bolting the tweaks on top of it might be a bit difficult. You could try adding "window.scrollTo(0,0);" when Zooming to the second level elements. But this would probably cause some artifacts.


Reply to this email directly or view it on GitHub.

from zoomooz.

elioscordo avatar elioscordo commented on August 11, 2024

Hi, I am facing the same problem.
Is it possible to change transform-origin during the scroll? this would act as hand drag effect and would cover the scrolling option.
Is it feasible?

thanks

from zoomooz.

DanielRuf avatar DanielRuf commented on August 11, 2024

I think it makes more sense to open a new issue and reference to this issue here

from zoomooz.

elioscordo avatar elioscordo commented on August 11, 2024

I made another issue named "Drag in zoom". Sorry and thank you again for the code.

from zoomooz.

jaukia avatar jaukia commented on August 11, 2024

There was another issue, #83, with similar ideas.

from zoomooz.

alexpoon2000 avatar alexpoon2000 commented on August 11, 2024

Is there any solution for the scroll or drag when zoom-in? I am having the same problem.

from zoomooz.

DanielRuf avatar DanielRuf commented on August 11, 2024

I think it is possible with some custom JavaScript code. But the last commit for this project is over a year old. And the forks were also not updated for a while.

from zoomooz.

jaukia avatar jaukia commented on August 11, 2024

I don't think there is any clean solution to this yet. And currently I don't have time to work on creating one. The problem is, that each browser handles the zooming + scrolling a bit differently so implementing this would need to take those differences into account.

from zoomooz.

rpotter9 avatar rpotter9 commented on August 11, 2024

Hi I have this problem too for smartphones. I don't want to scroll inside the zoomed container but actually scroll the whole page like normal and it seems when you do zoom in on the target, it disables this feature.

Any quick work around to enable scroll again just so users can scroll up and down the page like normal?

from zoomooz.

rpotter9 avatar rpotter9 commented on August 11, 2024

Not sure why they've done this but if you look in the non-min js of Zoomooz, on line 1171, they have this bit of code:

$(document).on("touchmove", function(e) { e.preventDefault(); });

It must be there for some reason but for I want it to do, I just commented out this bit of code and now scrolling on touch should work again for all mobiles!

from zoomooz.

DanielRuf avatar DanielRuf commented on August 11, 2024

It must be there for some reason but for I want it to do, I just commented out this bit of code and now scrolling on touch should work again for all mobiles!

https://github.com/jaukia/zoomooz/blob/master/jquery.zoomooz.js#L1171
Right, it prevented the normal scrolling as this caught the touchmove event / scroll gesture.

If this change breaks nothing and this could be also done with a custom setting supplied to zoomooz, a PR could make sense as @jaukia has merged some in the last month.

There is also just one branch which is still maintained as it seems https://github.com/sbrown345/zoomooz

Blame says it was added in August 2012, two months after this issue was filed: https://github.com/jaukia/zoomooz/blame/master/jquery.zoomooz.js#L1171

Also see 09dd868...0d603ac

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.