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

Fast event move (multiple times) / slow server update

Asked by Simon
10 years ago.

I'm using daypilot scheduler and are experiencing a problem when the backend is slow.

I've modified the demo code from DayPilotProMvc-7.8.5684 to simulate a delay of 500ms when moving an event. If I create a new event and then move it to a new position, and then to a new position again, a script error occurs in daypilot-scheduler.src.js after line 4554 - this line:

var e = object.event;

The event property is null and causes the next statement to throw an error when the end property is attempted to be accessed on "e".

I've recorded a video demonstrating how to provoke the error.
The modified code sample and the video can be found here (temporarily as of 2014-08-27): https://www.dropbox.com/s/tekr9p1x6458dpm/DayPilotProMvc-7.8.5684_bug.zip?dl=0

Is there any way I can fix this easily without any major side effects?

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

Hi Simon,

The latest sandbox build (7.9.5695) now supports BlockOnCallBack property. If you set it to true the Scheduler will create a temporary semi-transparent div over its main area which will prevent all user actions until the callback is finished.

See the sandbox:
http://mvc.daypilot.org/sandbox/

Another option is to use "Notify" handling for the callback operations. This will update the scheduler immediately after moving the events and the EventMove handler will be called on the background (just to notify the server about the change). This way the events don't get redrawn after the callback (so you can't perform any user action during the redrawing).

Comment posted by Simon
10 years ago.

Thanks for the reply.
BlockOnCallback works great!

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