Our pure JavaScript Scheduler component


Post by mateRO »

Hello Team,

I have been having some issues when using the resource histogram with events with multiple assignments. Please find attached a test case which replicates the errors.

The resource histogram has a different project, but which shares the eventStore of the project that the Scheduler uses. When trying to drag an event, the Scheduler freezes. When trying to change the duration of an event, only one of the components updates at first, and the other component updates only after I've scrolled across the timeline.

I've also uploaded a screenshots of the errors I get. There appear to be some issues with the drag context of the Scheduler, when using Firefox I frequently got "dd is undefined".


Post by saki »

Hello, I've downloaded and run your application and it throws the errors, however, the application is very difficult to debug as schedulerpro.umd.js is already processed from sources.

Could you modify https://www.bryntum.com/examples/scheduler-pro/resourcehistogram/ application to have your setup that would exhibit the error(s)?


Post by mateRO »

Unfortunately I couldn't replicate the errors in the demo, because when trying to set the eventStore in the hist_project project model with "eventStore: project.eventStore," I got the error 'Already entered replica' and the solution I found on other posts, namely using 'repopulateOnDataset : false,' didn't solve this issue.


Post by arcady »

One event store cannot belong to two projects.
Why don't you provide the same project to both the scheduler and the histogram?


Post by mateRO »

I would like the histogram to have completely different resources from the scheduler: the scheduler has departments as resources, the histogram has employees as resources, which is why I need two different projects. The events i.e. the projects are the same for both, since both the departments and employees have the same projects assigned to them. Is there another way to synchronize the events in the scheduler and the histogram if they have different resources and projects?


Post by arcady »

Ok if belonging to two projects does not work you could make another event store with the copies of original events and then track the original store changes to repeat them on the copies:

eventStore.on({
    change : (data) => {
        // apply original store changes to the copies
    }
});

Post by mateRO »

Thank you very much, that solution works.


Post Reply