Closed DavorBeg closed 10 months ago
I found soulution. So rangeY is [0, 0] until I zoom container, then I enable rangeY to scroll height of schedulerHeight
.
Maybe I didnt explained very well, if somebody will find similar problem I can create GIF to show what I mean.
const maxZoom = SchedulerInfiniteViewer.zoomRange[1];
const schedulerHeight = schedulerViewPort.clientHeight;
SchedulerInfiniteViewer.on("scroll", () => {
const currentZoom = Math.pow(SchedulerInfiniteViewer.getZoom(), 1);
const zoomPercentage = ((currentZoom - 1) / (maxZoom - 1))
// finaly set new Y range after zoom
SchedulerInfiniteViewer.rangeY = [0, ((currentZoom * schedulerHeight) - schedulerHeight) / currentZoom];
});
Hi! Is it possible to move only X position (left and right), but allow to scroll Y if I zoom in viewport. (scroll only viewport height) Thanks!