File tree 2 files changed +10
-6
lines changed
2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -261,9 +261,9 @@ define([
261
261
this . reRenderAllBlock_asc ( ) ;
262
262
this . resetBlockListAndRenderThisBlock ( block ) ;
263
263
}
264
- return true ;
264
+ return block ;
265
265
} else {
266
- return false ;
266
+ return null ;
267
267
}
268
268
}
269
269
@@ -292,9 +292,9 @@ define([
292
292
this . resetOptionPage ( ) ;
293
293
this . reRenderAllBlock_asc ( ) ;
294
294
}
295
- return true ;
295
+ return block ;
296
296
} else {
297
- return false ;
297
+ return null ;
298
298
}
299
299
300
300
}
Original file line number Diff line number Diff line change @@ -443,11 +443,15 @@ define([
443
443
444
444
/** option page - apply 버튼 클릭 함수 바인딩 */
445
445
$ ( document ) . on ( STR_CLICK , VP_ID_PREFIX + VP_APIBLOCK_BOARD_OPTION_APPLY_BUTTON , function ( ) {
446
- var isApplied = blockContainer . applyBlock ( ) ;
446
+ var appliedBlock = blockContainer . applyBlock ( ) ;
447
447
448
- if ( isApplied ) {
448
+ if ( appliedBlock ) {
449
449
// #11 applied! popup
450
450
vpCommon . renderSuccessMessage ( 'Applied!' ) ;
451
+
452
+ // #10 scroll to selected/applied block
453
+ var appliedBlockDom = appliedBlock . getBlockMainDom ( ) ;
454
+ $ ( VP_CLASS_PREFIX + VP_CLASS_APIBLOCK_BOARD ) . animate ( { scrollTop : $ ( appliedBlockDom ) . position ( ) . top } , "fast" ) ;
451
455
}
452
456
} ) ;
453
457
You can’t perform that action at this time.
0 commit comments