Hi!
We use your great scheduler and noticed an issue in the mentioned function while updating to the newest patch 5.2.4 from 5.2.3.
To give a little background:
- We offer our users to control the viewport of the scheduler with a date range input: when they select a start and an end date, data is loaded from the backend only for this time range and the view should zoom and scroll to focus the user on that time frame
- to achieve this, we use the member zoomTo of the scheduler instance using {startDate, endDate} options.
- We have an e2e Cypress test that changes the date frame and checks if the new frame is visible
- this test failed after the update, because the zoom was not adjusted by zoomTo()
- it seems this issue only occurs if the scheduler have only a small horizontal width
- the issues does not occur for single day frames
I could reproduce this in your examples:
- copy these two buttons in the tbar:
{
type : 'button',
text : 'zoomTo 01-01 - 01-04',
onClick() {
scheduler.zoomTo({startDate: new Date("2017-01-01"), endDate: new Date("2017-01-04")})
}
},
{
type : 'button',
text : 'zoomTo 01-01 - 01-02',
onClick() {
scheduler.zoomTo({startDate: new Date("2017-01-01"), endDate: new Date("2017-01-02")})
}
},
If the scheduler is wide enough, you can click both buttons alternately and the zoom/scroll will adjust correctly: switch from 2 days window to 4 days and back.
If you shrink the width of the main grid to about 800px with the separator of the code editor and click the buttons alternately, the zoom stops to work at all. One has to either manually zoom out with the mouse or change the width of the grid again.