Premium support for our pure JavaScript UI components


Post by emmaback »

We are currently setting up a quite full featured date navigation setup, with moving to dates, zoom in/out buttons, custom preset zoom levels among other things. We also want to use infiniteScroll, but when we enabled that we found that it doesn’t play nice with any of the mentioned features.

We’ve found examples you have of each feature, and I’ll try to describe how the error presents itself in each case. For each of the examples, just add infiniteScroll: true to the scheduler config.

  1. Zooming, for example in https://www.bryntum.com/products/schedulerpro/examples/resourceutilization/. When having all of the event in the viewport, zooming in and out changes the range of dates visible to the future or past, often to the point where no events are visible anymore.

  2. Changing active preset, for example in https://www.bryntum.com/products/schedulerpro/examples/drag-unplanned-tasks/. When changing presets using the dropdown (1 day, 3 days, 1 week in the example) nothing happens in the scheduler and we get the following error message in the console; Uncaught TypeError: Cannot read properties of undefined (reading ‘getTime’).

  3. Go to date, for example https://www.bryntum.com/products/schedulerpro/examples/drag-unplanned-tasks/. Going to a specific date (like “today” in the example) produces erratic results. Approximately every other time it goes to the correct date, and the other times it goes to another date.

Please let me know if you need more input

Best regards,


Post by marcio »

Hey,

Thanks for the detailed report, I reproduced the issues that you shared and created a ticket https://github.com/bryntum/support/issues/6654

Best regards,
Márcio


Post by emmaback »

Hi again,

Great, thanks for your quick response!

Best,
Emma


Post by Animal »

Re point 2. When using infiniteScroll, the time span encompassed by the view is under the control of the Scheduler.

It widens it to allow a lot of scrolling, and when it gets near to the end, it moves the "window" in time, and adjusts the scroll position so that the visuals do not change.

Attempting to tell it to use a certain set of dates will not work.

We're trying to make this clearer in the docs of the next release:

Screenshot 2023-04-26 at 14.22.40.png
Screenshot 2023-04-26 at 14.22.40.png (159.46 KiB) Viewed 415 times

Post by Animal »

Re point 3, it's another case of the app not being designed to use infiniteScroll. It attempts to set the time span which is under the control of infiniteScroll.

To move a date into view use the visibleDate config: https://www.bryntum.com/products/scheduler/docs/api/Scheduler/view/TimelineBase#config-visibleDate


Post by Animal »

I just noticed that the visibleDate property is not visible in the API docs. The property exists, but there was a small syntax error in the documentation which prevented it from being visible. It will look like this in the next version:

Screenshot 2023-04-27 at 10.10.05.png
Screenshot 2023-04-27 at 10.10.05.png (137.99 KiB) Viewed 408 times

Post by Animal »

When zooming, it makes best attempt to keep the current center date in the center.

This is extremely difficult in the example when paired with that histogram. A zoom is a very time consuming reconfiguration process anyway. It moves to the next ViewPreset in the store which is at the preferred scale, either closer or further out.

This will rerender the time range and then it attempts to scroll the previously cached center date to the center.

The paired scheduler below has its own reactions to what its partner does and tries to stay in sync which will also be uite heavy operations.

Sweeping fast, smooth zooming is not to be expected.


Post by gismya »

Regarding point 2. Is there anyway while using infinite scroll to go to a set zoom level?


Post by Animal »

Yes, you can change the ViewPreset at any time.

Point 2 was to do with that example app attempting to show 1 day, 3 days or 1 week. That is not going to work with infiniteScroll. It will always expand the encompassed range to provide plenty of scroll.


Post by Animal »

Hello. Just enquiring if all your questions have been cleared up.

If there are any issues in the app that you are developing. Please create a new thread explaining one single issue with full reproduction steps.


Post Reply