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

is there a way to zoom only the X axis?

Open pavel1860 opened this issue 2 years ago • 5 comments

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?

pavel1860 avatar Jan 26 '23 15:01 pavel1860

@pavel1860

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

daybrush avatar Jan 26 '23 17:01 daybrush

do you have any estimate when will it be?

pavel1860 avatar Jan 26 '23 17:01 pavel1860

@pavel1860

maybe 4 days?

daybrush avatar Jan 26 '23 17:01 daybrush

@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;

daybrush avatar Jan 27 '23 18:01 daybrush

thanks! I wil check it out

pavel1860 avatar Jan 28 '23 10:01 pavel1860