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

Zoomooz working, but zooming into wrong spot on page #95

Open aleshh opened 10 years ago

aleshh commented 10 years ago

Zoomooz working on my page, but zooming into the wrong place.

[http://artandculturecenter.org/brick-dev/tmp.html]

(zoomable elements are 6 images about 3/4 of the way down the page)

m-emelchenkov commented 10 years ago

+1. Moreover, the problem exists with "nativeanimation" and "preservescroll" both "false" or "true".

m-emelchenkov commented 10 years ago

I tried to fix this, but can't find any better solution than just comment out the line which deals with scroller position in jquery.zoomooz.js. There are drawbacks: at scaling time the page resets its scroll, then scroll down again, which looks flickering, but at least it is a predictable result compared to buggy one.

helpers.forEachPrefix(function(prefix) {
        //$root.css(prefix+"transform", transformStr);
});
tylerburleigh commented 8 years ago

Thanks for the solution, @m-emelchenkov.

kjng commented 6 years ago

I ran into this problem myself with my project which involves overlaying an image with zoomBoxes. The image extends past the initial viewport and because zoomooz seems to calculate the transform based on the current center of the visible viewport, my elements appeared below the fold when zoomed in.

I tried the fix above but it didn't seem to change the functionality or zoom of the viewport. However, if I scroll to the middle of the zoomContainer and attempt to zoom again, the zoomBoxes are correctly centered in the viewport.