Hi,
Can you please let us know if if we can apply 'Zoom to fit' automatically on load.
Support Forum
Hi Marcio,
Thanks for the reply. The code you shared works perfectly when we load the gantt for the first time. But when we click on 'zoom to fit' button on the Advanced demo, its lands on some random period.
I have recorded the steps by editing the 'Advanced Demo' and shared the link below. Please let me know if you need any more details related to this issue.https://frontrol-my.sharepoint.com/personal/cgupta_frontrol_com/_layouts/15/stream.aspx?id=%2Fpersonal%2Fcgupta%5Ffrontrol%5Fcom%2FDocuments%2FRecordings%2FMeeting%20with%20Chirag%20Gupta%2D20230523%5F223811%2DMeeting%20Recording%2Emp4&ga=1
Hi Marcio,
Please use the below link
https://frontrol-my.sharepoint.com//p/cgupta/EV18O2p3icdLs8sFrVt862kB6YMIPmrajjzbtJltXTPGIg?e=LMnajG
We have a feature request for this functionality here https://github.com/bryntum/support/issues/5144
Btw, this event should fits better to zoomToFit needs, because data might be recalculated after load
project : {
// ...
listeners : {
dataready : {
fn() {
gantt.zoomToFit();
},
once : true // call it only once
}
}
I also reproduced the bug you mentioned here and opened a ticket https://github.com/bryntum/support/issues/6852
All the best,
Alex