File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,6 @@ class CornerstoneViewport extends Component {
107107 imageIdIndex, // Maybe
108108 imageProgress : 0 ,
109109 isLoading : true ,
110- numImagesLoaded : 0 ,
111110 error : null ,
112111 // Overlay
113112 scale : undefined ,
@@ -127,6 +126,8 @@ class CornerstoneViewport extends Component {
127126 this . startLoadHandler = this . props . startLoadHandler ;
128127 this . endLoadHandler = this . props . endLoadHandler ;
129128 this . loadHandlerTimeout = undefined ; // "Loading..." timer
129+
130+ this . numImagesLoaded = 0 ;
130131 }
131132
132133 // ~~ LIFECYCLE
@@ -686,9 +687,7 @@ class CornerstoneViewport extends Component {
686687 onImageLoaded = ( ) => {
687688 // TODO: This is not necessarily true :thinking:
688689 // We need better cache reporting a layer up
689- this . setState ( {
690- numImagesLoaded : this . state . numImagesLoaded + 1 ,
691- } ) ;
690+ this . numImagesLoaded ++ ;
692691 } ;
693692
694693 onImageProgress = e => {
You can’t perform that action at this time.
0 commit comments