@@ -8,7 +8,6 @@ define(function(require, exports, module) {
88 console . log ( "Loading UI for perspectiveList" ) ;
99
1010 var TSCORE = require ( "tscore" ) ;
11- var TSPOSTIO = require ( "tspostioapi" ) ;
1211 var saveAs = require ( "libs/filesaver.js/FileSaver.min" ) ;
1312
1413 var TMB_SIZES = [ "100px" , "200px" , "300px" , "400px" , "500px" ] ;
@@ -312,6 +311,7 @@ define(function(require, exports, module) {
312311 } else {
313312 orderBy = false ;
314313 }
314+ showSortDataInList = 'byFileSize' ;
315315 saveExtSettings ( ) ;
316316 self . reInit ( ) ;
317317 } ) ;
@@ -594,17 +594,9 @@ define(function(require, exports, module) {
594594 $ ( this ) . parent ( ) . parent ( ) . find ( "i" ) . toggleClass ( "fa-check-square-o" ) . toggleClass ( "fa-square-o" ) ;
595595 //TSCORE.selectedFiles.push($(this).attr("filepath"));
596596 selectedIsFolderArr [ $ ( this ) . attr ( "filepath" ) ] = ( typeof ( $ ( this ) . attr ( "folderpath" ) ) != "undefined" ) ;
597-
598- var rectangle = this . getBoundingClientRect ( ) ;
599- var isVisible = (
600- rectangle . top >= 100 &&
601- rectangle . left >= 0 &&
602- rectangle . bottom <= ( window . innerHeight || document . documentElement . clientHeight ) &&
603- rectangle . right <= ( window . innerWidth || document . documentElement . clientWidth )
604- ) ;
605- if ( ! isVisible ) {
597+ if ( ! TSCORE . Utils . isVisibleOnScreen ( this ) ) {
606598 $ ( "#viewContainers" ) . animate ( {
607- scrollTop : $ ( '.ui-selected' ) . offset ( ) . top - $ ( "#perspectiveListContainer" ) . offset ( ) . top
599+ scrollTop : $ ( this ) . offset ( ) . top - $ ( "#perspectiveListContainer" ) . offset ( ) . top
608600 } , 100 ) ;
609601 }
610602 }
0 commit comments