File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,7 @@ class CornerstoneViewport extends Component {
229229 try {
230230 // load + display image
231231 const imageId = stack [ imageIndex ] ;
232+ cornerstoneTools . stopClip ( this . element ) ;
232233 const image = await cornerstone . loadAndCacheImage ( imageId ) ;
233234
234235 cornerstone . displayImage ( this . element , image ) ;
@@ -270,7 +271,9 @@ class CornerstoneViewport extends Component {
270271 isOverlayVisible : prevIsOverlayVisible ,
271272 } = prevProps ;
272273 const validFrameRate = Math . max ( frameRate , 1 ) ;
273- const shouldStart = isPlaying !== prevIsPlaying && isPlaying ;
274+ const shouldStart =
275+ ( isPlaying !== prevIsPlaying && isPlaying ) ||
276+ ( isPlaying && hasStackChanged ) ;
274277 const shouldPause = isPlaying !== prevIsPlaying && ! isPlaying ;
275278 const hasFrameRateChanged = isPlaying && frameRate !== prevFrameRate ;
276279
You can’t perform that action at this time.
0 commit comments