Merge "Emit teardown event before replacing generated content node content and emit setup event after."

This commit is contained in:
jenkins-bot 2013-05-16 01:23:34 +00:00 committed by Gerrit Code Review
commit 57a2de90aa

View file

@ -49,7 +49,9 @@ ve.ce.GeneratedContentNode.prototype.onUpdate = function () {
var store = this.model.doc.getStore(),
index = store.indexOfHash( ve.getHash( this.model ) );
if ( index !== null ) {
this.emit( 'teardown' );
this.$.empty().append( store.value( index ) );
this.emit( 'setup' );
} else {
this.startGenerating();
this.generateContents()