daybrush / infinite-viewer

Infinite Viewer is Document Viewer Component with infinite scrolling.
https://daybrush.com/infinite-viewer/
MIT License
283 stars 30 forks source link

is there a way to zoom only the X axis? #39

Open pavel1860 opened 1 year ago

pavel1860 commented 1 year ago

I need to create a timeline with infinite scroll and ability to zoom. but the zoom is only needed for the x direction so all the components height will be kept. is there a way to do it?

daybrush commented 1 year ago

@pavel1860

I will add zoomX and zoomY functions in the next update.

pavel1860 commented 1 year ago

do you have any estimate when will it be?

daybrush commented 1 year ago

@pavel1860

maybe 4 days?

daybrush commented 1 year ago

@pavel1860

infinite-viewer's new version is released.

If you use pinch, use pinchDirection: "horizontal".

Also, zoomX exists in the `pinch event property,

onPinch={e => {
    console.log(e.zoomX);
}}
viewer.zoomX = 1.5;
pavel1860 commented 1 year ago

thanks! I wil check it out