infinite-viewer icon indicating copy to clipboard operation
infinite-viewer copied to clipboard

Contrary to documentaion, zoom needs to be used with zoomX and zoomY

Open longtengz opened this issue 1 year ago • 1 comments

We were previously using vue2-infinite-viewer (a version prior to this change https://github.com/daybrush/infinite-viewer/commit/ea62972f118ad87d1388fec33e110539c4feee03). And we only need to set zoom.

But when we update to the newest version of vue3-infinite-viewer (which has the zoomX and zoomY change), setting zoom alone does not work as the style shows that scale is still (1, 1) which contradicts with our value 0.75 for zoom.

After some digging, I saw this change https://github.com/daybrush/infinite-viewer/commit/ea62972f118ad87d1388fec33e110539c4feee03 , and found that upon rendering it's using zoomX=1, zoomY=1. So I pass in zoomX=0.75and zoomY=0.75 alongside with zoom=0.75, and voila it works.

However, when reading the documentation it clearly says do not use them together,

If you use the zoom property, don't use the zoomX and zoomY properties.

so I think there's something wrong with the implementation.

longtengz avatar Jul 24 '23 10:07 longtengz

@longtengz I checked and it works fine.

It is my intention to use only zoom or only (zomX, zoomY).

Is there a demo I can check out?

daybrush avatar Jul 30 '23 10:07 daybrush