we execute the post-edit sequence in the next round of javascript events... this is important because some application level code (for instance the undo manager) assumes that events will not be fired immediately

This commit is contained in:
Javier Abadia 2014-02-05 00:08:25 +01:00
parent d8c69da02a
commit 79d1d6d00b

View File

@ -87,8 +87,11 @@ define([
},this);
/* we already pushed the edits into the local store, now we let the FeatureLayer to do the local updating of the layer graphics */
this._editHandler(results, adds, updatesMap, callback, errback, deferred);
self.emit(self.events.EDITS_ENQUEUED, results);
setTimeout(function()
{
this._editHandler(results, adds, updatesMap, callback, errback, deferred);
self.emit(self.events.EDITS_ENQUEUED, results);
}.bind(this),0);
return deferred;
}
}; // layer.applyEdits()