I want to add a special event after loading a bunch of events from a url and have a onEventAdded listener fire when the special event is added. I’m using the following code but I’m surprised that I have to explicitly set scheduler._loading = false in order for the onEventAdded listener to fire.
scheduler.load(events_url, 'json', function() {
alert("appts loaded is_loading: " + scheduler._loading );
scheduler._loading = false; // Needed so that onEventAdded listeners fire!
addEvent(...);
});
I was expecting that scheduler._loading should already be false when the async callback code is executing.