Page 1 of 1

Gantt - disable scroll before project start date after click on zoomToFit

Posted: Mon Sep 26, 2022 4:38 pm
by sasha573

Hi guys!
Initially the gantt is loaded with "weekAndMonth" view preset and doesn't allow scrolling back before the project start date (which is the expected behavior).

Capture.PNG
Capture.PNG (18.34 KiB) Viewed 255 times

However, when we click on zoomToFit, the behaviour changes and we can scroll before the project start date.

Capture2.PNG
Capture2.PNG (19.84 KiB) Viewed 255 times

Is there is an option to disable scrolling before the project start date?


Re: Gantt - disable scroll before project start date after click on zoomToFit

Posted: Mon Sep 26, 2022 8:15 pm
by marcio

Hey sasha573,

Thanks for the report, I created a ticket to fix this behavior https://github.com/bryntum/support/issues/5324

As a workaround, you can run

window.gantt.setTimeSpan(window.gantt.project.startDate, window.gantt.project.endDate)

And that will also not allow the scroll before the project start date.


Re: Gantt - disable scroll before project start date after click on zoomToFit

Posted: Tue Sep 27, 2022 3:07 pm
by sasha573

Thanks, Marcio!