@@ -230,12 +230,12 @@ class ComponentController {
230230 }
231231
232232 initializeScopeGetComponentState ( scope , childControllerName ) {
233- scope . getComponentState = isSubmit => {
233+ scope . getComponentState = ( isSubmit ) => {
234234 const deferred = this . $q . defer ( ) ;
235235 const childController = scope [ childControllerName ] ;
236236 if ( this . hasDirtyWorkToSendToParent ( childController , isSubmit ) ) {
237237 const action = this . getDirtyWorkToSendToParentAction ( childController , isSubmit ) ;
238- childController . createComponentState ( action ) . then ( componentState => {
238+ childController . createComponentState ( action ) . then ( ( componentState ) => {
239239 deferred . resolve ( componentState ) ;
240240 } ) ;
241241 } else {
@@ -460,7 +460,7 @@ class ComponentController {
460460 * data has changed.
461461 */
462462 createComponentStateAndBroadcast ( action ) {
463- this . createComponentState ( action ) . then ( componentState => {
463+ this . createComponentState ( action ) . then ( ( componentState ) => {
464464 this . emitComponentStudentDataChanged ( componentState ) ;
465465 } ) ;
466466 }
@@ -670,7 +670,7 @@ class ComponentController {
670670 }
671671
672672 importWorkByStudentWorkId ( studentWorkId ) {
673- this . StudentDataService . getStudentWorkById ( studentWorkId ) . then ( componentState => {
673+ this . StudentDataService . getStudentWorkById ( studentWorkId ) . then ( ( componentState ) => {
674674 if ( componentState != null ) {
675675 this . setStudentWork ( componentState ) ;
676676 this . setParentStudentWorkIdToCurrentStudentWork ( studentWorkId ) ;
@@ -751,7 +751,7 @@ class ComponentController {
751751 }
752752
753753 attachStudentAsset ( studentAsset ) {
754- return this . StudentAssetService . copyAssetForReference ( studentAsset ) . then ( copiedAsset => {
754+ return this . StudentAssetService . copyAssetForReference ( studentAsset ) . then ( ( copiedAsset ) => {
755755 const attachment = {
756756 studentAssetId : copiedAsset . id ,
757757 iconURL : copiedAsset . iconURL ,
@@ -829,7 +829,7 @@ class ComponentController {
829829 this . audioRecordedSubscription = this . AudioRecorderService . audioRecorded$ . subscribe (
830830 ( { requester, audioFile } ) => {
831831 if ( requester === `${ this . nodeId } -${ this . componentId } ` ) {
832- this . StudentAssetService . uploadAsset ( audioFile ) . then ( studentAsset => {
832+ this . StudentAssetService . uploadAsset ( audioFile ) . then ( ( studentAsset ) => {
833833 this . attachStudentAsset ( studentAsset ) . then ( ( ) => {
834834 this . StudentAssetService . deleteAsset ( studentAsset ) ;
835835 } ) ;
@@ -871,7 +871,7 @@ class ComponentController {
871871 $scope . nodeId = nodeId ;
872872 $scope . componentId = componentId ;
873873 $scope . componentState = componentState ;
874- $scope . closeDialog = function ( ) {
874+ $scope . closeDialog = function ( ) {
875875 $mdDialog . hide ( ) ;
876876 } ;
877877 }
@@ -882,12 +882,14 @@ class ComponentController {
882882 if ( componentState . nodeId == nodeId && componentState . componentId == componentId ) {
883883 setTimeout ( ( ) => {
884884 const componentService = this . $injector . get ( componentState . componentType + 'Service' ) ;
885- componentService . generateImageFromRenderedComponentState ( componentState ) . then ( image => {
886- clearTimeout ( destroyDoneRenderingComponentListenerTimeout ) ;
887- doneRenderingComponentSubscription . unsubscribe ( ) ;
888- deferred . resolve ( image ) ;
889- this . $mdDialog . hide ( ) ;
890- } ) ;
885+ componentService
886+ . generateImageFromRenderedComponentState ( componentState )
887+ . then ( ( image ) => {
888+ clearTimeout ( destroyDoneRenderingComponentListenerTimeout ) ;
889+ doneRenderingComponentSubscription . unsubscribe ( ) ;
890+ deferred . resolve ( image ) ;
891+ this . $mdDialog . hide ( ) ;
892+ } ) ;
891893 } , 1000 ) ;
892894 }
893895 }
0 commit comments