@@ -532,32 +532,8 @@ define(['marionette',
532532
533533 inspectionLoaded : function ( ) {
534534 this . selectSample ( )
535- this . preCache ( 1 )
536535 } ,
537536
538- preCache : function ( n ) {
539- clearTimeout ( this . cachethread )
540-
541- var self = this
542- var i = this . inspectionimages . at ( n )
543- if ( this . caching && i ) {
544- var xhr = new XHRImage ( )
545- console . log ( 'caching' , i . urlFor ( 'hd' ) )
546- xhr . load ( i . urlFor ( 'full' ) , function ( ) {
547- self . plateView . drawPlate ( )
548-
549- if ( n + 1 === self . inspectionimages . length ) self . ui . status . html ( '' )
550- else self . ui . status . html ( 'Loaded ' + ( n + 1 ) + ' out of ' + self . inspectionimages . length + ' images' )
551-
552- self . cachethread = setTimeout ( function ( ) {
553- self . preCache ( ++ n )
554- } , 200 )
555- } )
556- }
557-
558- } ,
559-
560-
561537 playInspection : function ( e ) {
562538 e . preventDefault ( )
563539
@@ -600,9 +576,7 @@ define(['marionette',
600576
601577 initialize : function ( options ) {
602578 this . isPlaying = false
603- this . cachethread = null
604579 this . playthread = null
605- this . caching = ! app . mobile ( )
606580
607581 this . samples = new Samples ( null , { state : { pageSize : 9999 } } )
608582 this . samples . queryParams . cid = options . model . get ( 'CONTAINERID' )
@@ -944,17 +918,13 @@ define(['marionette',
944918 }
945919
946920 if ( this . getOption ( 'params' ) . sid ) {
947- const s = this . samples . findWhere ( { BLSAMPLEID : this . getOption ( 'params' ) . sid } )
921+ const s = this . samples . findWhere ( { BLSAMPLEID : this . getOption ( 'params' ) . sid . toString ( ) } )
948922 if ( s ) s . set ( { isSelected : true } )
949923 } else this . samples . at ( 0 ) . set ( { isSelected : true } )
950924 this . sample . show ( this . singlesample )
951925
952926 } ,
953927
954- onDestroy : function ( ) {
955- clearTimeout ( this . cachethread )
956- this . caching = false
957- } ,
958928 } )
959929
960930} )
0 commit comments