diff --git a/src/ui/step/GeneralStepUi.js b/src/ui/step/GeneralStepUi.js index bb9eb76..1873b4d 100644 --- a/src/ui/step/GeneralStepUi.js +++ b/src/ui/step/GeneralStepUi.js @@ -407,14 +407,7 @@ module.exports = Class( 'StepUi' ) return; } - // give the UI a chance to update the DOM; otherwise, the - // answer elements we update may no longer be used (this also - // has performance benefits since it allows repainting before - // potentially heavy processing) - setTimeout( function() - { - _self._updateAnswerFieldData( data ); - }, 25 ); + _self.answerDataUpdate( data ); } ); doUpdate( bucket.getData() ); @@ -442,6 +435,28 @@ module.exports = Class( 'StepUi' ) }, + /** + * Update and style answer field data + * + * @param {Object} data key-value diff + * + * @return {undefined} + */ + 'virtual protected answerDataUpdate': function( data ) + { + var _self = this; + + // give the UI a chance to update the DOM; otherwise, the + // answer elements we update may no longer be used (this also + // has performance benefits since it allows repainting before + // potentially heavy processing) + setTimeout( function() + { + _self._updateAnswerFieldData( data ); + }, 25 ); + }, + + /** * Update DOM answer fields with respective datum in diff DATA *