If scroll to using mouser or zoom fit, zoomIn and Zoom out its scrolling infinite times Only in Left side. See Sample below
this is continous scroll logic
this.activityGantt.attachEvent(“onGanttScroll”, (left, top) => {
if (!this.ganttToolBarRef.isZoomBtnClick) {
const unit = this.activityGantt.getScale().unit;
const left_date = this.activityGantt.dateFromPos(left);
const right_date = this.activityGantt.dateFromPos(left + this.activityGantt.$task.offsetWidth);
this.activityGantt.config.start_date = this.activityGantt.config.start_date || this.activityGantt.getState().min_date;
this.activityGantt.config.end_date = this.activityGantt.config.end_date || this.activityGantt.getState().max_date;
const min_allowed_date = this.activityGantt.date.add(this.activityGantt.config.start_date, 1, unit);
const max_allowed_date = this.activityGantt.date.add(this.activityGantt.config.end_date, -2, unit);
let repaint = false;
if (+left_date <= +min_allowed_date) {
this.activityGantt.config.start_date = this.activityGantt.date.add(this.activityGantt.config.start_date, -2, unit);
repaint = true;
}
if (+right_date >= +max_allowed_date) {
this.activityGantt.config.end_date = this.activityGantt.date.add(this.activityGantt.config.end_date, 2, unit);
repaint = true;
}
if (repaint) {
setTimeout(() => {
this.activityGantt.render();
}, 100)
}
}
});