GeneralStepUi answer styling method extraction
This is just to enable some sort of testing without instantiating the entire class and navigating a maze of methods. * ui/step/GeneralStepUi.js (answerDataUpdate): Added (_processAnswerFields): Extracted function into answerDataUpatemaster
parent
a6a3ffdcc4
commit
7a1e1a68e3
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue