LT-398: Toggle manual stack scroll synchronization between viewports
This commit is contained in:
1 parent
2e6c8245d8
commit
c3fc0b2b3b
9 files changed
+187
-4
No files matched your search
@@ -115,6 +115,16 @@ clearTools = () => {
|
||||
cornerstone.updateImage(element);
|
||||
};
|
||||
|
||||
linkStackScroll = () => {
|
||||
const synchronizer = OHIF.viewer.stackImagePositionOffsetSynchronizer;
|
||||
|
||||
if(synchronizer.isActive()) {
|
||||
synchronizer.deactivate();
|
||||
} else {
|
||||
synchronizer.activate();
|
||||
}
|
||||
}
|
||||
|
||||
// Toggle the play/stop state for the cornerstone clip tool
|
||||
toggleCinePlay = () => {
|
||||
// Get the active viewport element
|
||||
@@ -168,6 +178,8 @@ isPlaying = () => {
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Check if a study has multiple frames
|
||||
hasMultipleFrames = () => {
|
||||
// Its called everytime active viewport and/or layout change
|
||||
@@ -239,5 +251,16 @@ hasMultipleFrames = () => {
|
||||
return false;
|
||||
};
|
||||
|
||||
isStackScrollLinkingDisabled = () => {
|
||||
// Its called everytime active viewport and/or layout change
|
||||
Session.get('activeViewport');
|
||||
Session.get('LayoutManagerUpdated');
|
||||
|
||||
const synchronizer = OHIF.viewer.stackImagePositionOffsetSynchronizer;
|
||||
const linkableViewports = synchronizer.getLinkableViewports();
|
||||
|
||||
return linkableViewports.length <= 1;
|
||||
}
|
||||
|
||||
// Create an event listener to update playing state when a clip stops playing
|
||||
$(window).on('CornerstoneToolsClipStopped', () => Session.set('UpdateCINE', Random.id()));
|
||||
Reference in new issue
Block a user