search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Events moving/resizing does not work with dynamicLoading enabled

Asked by Olivier
4 years ago.

I had a scheduler without dynamic loading and everything works well.
Now I enable dynamic loading. Since I do that I can't move or resize the events !
onEventMoved fire but the events remain in place on the scheduler view.

We want verify eveything works fine without buy Pro-licence

Any help will be appreciated


Answer posted by Dan Letecky [DayPilot]
4 years ago.

There is a sample project that shows how to use the Scheduler dynamic loading. It's a more real-world scenario, it uses a database backend (unlike the demos that come with DayPilot Pro for JavaScript download).

You can give it a try and compare it with your implementation.

The key thing is that you need to update the event position using onEventResize/onEventMove before the events are refreshed (e.g. using onScroll). With the default eventMoveHandling value ("Update") the events are updated on the client side immediately so they will move correctly.

However, the dynamic loading fires onScroll to reload events quite often. If it loads the old event state it will look like it moved the event back to the previous position.

Let me know if it didn't help.

Comment posted by Olivier
4 years ago.

Thank's for the answer.
The project you mention is the one I use to start our project.

I added $scope.dp.eventMoveHandling = "Update"; but no change. It does not work.

When I add a 'return' at beginning of the 'OnScroll' function, I can move and resize events ! (but the events are not loaded from the database when scrolling is done of course).
As soon as 'onScroll' function do more than nothing (Ajax load from database), move (and resize) events does not work anymore !
onScroll is not fired when I try to move an event but when it is not empty, it prevent the moving/resizing event to work.

P.S. We are on Angular.

Please help us.

Comment posted by Dan Letecky [DayPilot]
4 years ago.

Hi Olivier, thanks for the update.

It looks like it's an angular-specific issue - please let me check that.

Comment posted by Olivier
4 years ago.

Thank's a lot.
We hope you find what's wrong.

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.