fix: imagScrollbar should not stop cine if not playing (#2920)

This commit is contained in:
Alireza 2022-09-08 14:42:25 -04:00 committed by GitHub
parent a16d7e1402
commit 83264bb5a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,9 +25,13 @@ function CornerstoneImageScrollbar({
viewportId
);
// on image scrollbar change, stop the CINE if it is playing
CineService.stopClip(element);
CineService.setCine({ id: viewportIndex, isPlaying: false });
const { isCineEnabled } = CineService.getState();
if (isCineEnabled) {
// on image scrollbar change, stop the CINE if it is playing
CineService.stopClip(element);
CineService.setCine({ id: viewportIndex, isPlaying: false });
}
csToolsUtils.jumpToSlice(viewport.element, {
imageIndex,