LT-405: syncronized scrolling issue
This commit is contained in:
parent
ffc32fb214
commit
2752228c7f
@ -236,4 +236,6 @@ Template.viewer.onDestroyed(() => {
|
||||
Session.set('ViewerMainReady', false);
|
||||
Session.set('TimepointsReady', false);
|
||||
Session.set('MeasurementsReady', false);
|
||||
|
||||
OHIF.viewer.stackImagePositionOffsetSynchronizer.deactivate();
|
||||
});
|
||||
|
||||
@ -77,7 +77,6 @@ OHIF.measurements.jumpToRowItem = (rowItem, timepoints) => {
|
||||
|
||||
const activateMeasurements = OHIF.measurements.activateMeasurements;
|
||||
const activatedViewportIndexes = [];
|
||||
const syncViewportsByIndexesOnce = _.once(syncViewports);
|
||||
let syncViewportsCaller = syncViewports;
|
||||
let renderCount = 0;
|
||||
|
||||
@ -143,7 +142,8 @@ OHIF.measurements.jumpToRowItem = (rowItem, timepoints) => {
|
||||
}
|
||||
}
|
||||
|
||||
syncViewportsCaller = _.after(++renderCount, syncViewportsCaller);
|
||||
// The sync will be called only after loading all series on viewports
|
||||
syncViewportsCaller = _.after(++renderCount, syncViewports);
|
||||
|
||||
// Otherwise, re-render the viewport with the required study/series, then
|
||||
// add an onRendered callback to activate the measurements
|
||||
@ -160,6 +160,7 @@ OHIF.measurements.jumpToRowItem = (rowItem, timepoints) => {
|
||||
renderedCallback);
|
||||
}
|
||||
|
||||
// If all viewports are already rendered then sync them
|
||||
if (!renderCount) {
|
||||
syncViewportsCaller(activatedViewportIndexes);
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ Template.thumbnailEntry.events({
|
||||
|
||||
// Event handlers for double click
|
||||
'dblclick .thumbnailEntry'(event, instance) {
|
||||
|
||||
if (instance.isDragAndDrop) {
|
||||
// Get the active viewport index and total number of viewports...
|
||||
const viewportCount = OHIF.viewerbase.layoutManager.getNumberOfViewports();
|
||||
let viewportIndex = Session.get('activeViewport') || 0;
|
||||
@ -55,6 +55,7 @@ Template.thumbnailEntry.events({
|
||||
// Rerender the viewport using the clicked thumbnail data
|
||||
OHIF.viewerbase.layoutManager.rerenderViewportWithNewDisplaySet(viewportIndex, data);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Template.thumbnailEntry.helpers({
|
||||
|
||||
@ -39,7 +39,7 @@ export class StackImagePositionOffsetSynchronizer {
|
||||
}
|
||||
|
||||
this.active = false;
|
||||
toolManager.deactivateCommandButton('link');
|
||||
toolManager.deactivateCommandButton('linkStackScroll');
|
||||
}
|
||||
|
||||
update() {
|
||||
@ -73,7 +73,7 @@ export class StackImagePositionOffsetSynchronizer {
|
||||
});
|
||||
|
||||
this.active = true;
|
||||
toolManager.activateCommandButton('link');
|
||||
toolManager.activateCommandButton('linkStackScroll');
|
||||
Session.set('StackImagePositionOffsetSynchronizerLinkedViewports', viewportIndexes);
|
||||
|
||||
}
|
||||
|
||||
@ -447,7 +447,7 @@ export const toolManager = {
|
||||
const activeCommandButtons = Session.get('ToolManagerActiveCommandButtons') || [];
|
||||
|
||||
if(activeCommandButtons.indexOf(button) === -1) {
|
||||
activeCommandButtons.push('link');
|
||||
activeCommandButtons.push(button);
|
||||
Session.set('ToolManagerActiveCommandButtons', activeCommandButtons);
|
||||
}
|
||||
},
|
||||
|
||||
@ -255,7 +255,7 @@ const stopAllClips = () => {
|
||||
|
||||
const isStackScrollLinkingDisabled = () => {
|
||||
// Its called everytime active viewport and/or layout change
|
||||
Session.get('activeViewport');
|
||||
Session.get('viewportActivated');
|
||||
Session.get('LayoutManagerUpdated');
|
||||
|
||||
const synchronizer = OHIF.viewer.stackImagePositionOffsetSynchronizer;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user