Fix Viewer opening bugs in OHIF Viewer (OHIF-49)
This commit is contained in:
1 parent
1a264f81e5
commit
afeb0d82fb
21 files changed
+72
-87
No files matched your search
@@ -2,6 +2,7 @@ Template.flexboxLayout.events({
|
||||
'transitionend .sidebarMenu'() {
|
||||
handleResize();
|
||||
},
|
||||
|
||||
'transitionend .sidebar-option'(event) {
|
||||
// Prevent this event from bubbling
|
||||
event.stopPropagation();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
const worklistContentId = 'worklistTab';
|
||||
const viewerContentId = 'viewerTab';
|
||||
let lastContentId;
|
||||
|
||||
// Test
|
||||
|
||||
// Define the ViewerData global object
|
||||
// If there is currently any Session data for this object,
|
||||
@@ -15,7 +17,7 @@ Template.ohifViewer.events({
|
||||
if (contentId !== worklistContentId) {
|
||||
switchToTab(worklistContentId);
|
||||
} else {
|
||||
switchToTab(viewerContentId);
|
||||
switchToTab(lastContentId);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -23,6 +25,7 @@ Template.ohifViewer.events({
|
||||
Template.ohifViewer.helpers({
|
||||
studyListToggleText() {
|
||||
const contentId = Session.get('activeContentId');
|
||||
Session.get('ViewerData');
|
||||
|
||||
// If the Viewer has not been opened yet, 'Back to viewer' should
|
||||
// not be displayed
|
||||
@@ -34,6 +37,7 @@ Template.ohifViewer.helpers({
|
||||
if (contentId === worklistContentId) {
|
||||
return 'Back to viewer';
|
||||
} else {
|
||||
lastContentId = contentId;
|
||||
return 'Study list';
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
//test2
|
||||
|
||||
OHIF.viewer = OHIF.viewer || {};
|
||||
OHIF.viewer.loadIndicatorDelay = 500;
|
||||
OHIF.viewer.defaultTool = 'wwwc';
|
||||
@@ -35,9 +37,7 @@ Template.viewer.onCreated(() => {
|
||||
|
||||
if (ViewerData[contentId] && ViewerData[contentId].loadedSeriesData) {
|
||||
log.info('Reloading previous loadedSeriesData');
|
||||
|
||||
OHIF.viewer.loadedSeriesData = ViewerData[contentId].loadedSeriesData;
|
||||
|
||||
} else {
|
||||
log.info('Setting default ViewerData');
|
||||
OHIF.viewer.loadedSeriesData = {};
|
||||
@@ -48,7 +48,6 @@ Template.viewer.onCreated(() => {
|
||||
ViewerData[contentId].viewportColumns = 1;
|
||||
ViewerData[contentId].viewportRows = 1;
|
||||
ViewerData[contentId].activeViewport = 0;
|
||||
Session.set('ViewerData', ViewerData);
|
||||
}
|
||||
|
||||
Session.set('activeViewport', ViewerData[contentId].activeViewport || 0);
|
||||
@@ -56,10 +55,14 @@ Template.viewer.onCreated(() => {
|
||||
// Update the ViewerStudies collection with the loaded studies
|
||||
ViewerStudies.remove({});
|
||||
|
||||
ViewerData[contentId].studyInstanceUids = [];
|
||||
instance.data.studies.forEach(study => {
|
||||
study.selected = true;
|
||||
ViewerStudies.insert(study);
|
||||
ViewerData[contentId].studyInstanceUids.push(study.studyInstanceUid);
|
||||
});
|
||||
|
||||
Session.set('ViewerData', ViewerData);
|
||||
});
|
||||
|
||||
Template.viewer.events({
|
||||
|
||||
@@ -8,4 +8,9 @@
|
||||
height: 100%
|
||||
width: 100%
|
||||
margin: 0
|
||||
padding: 0
|
||||
padding: 0
|
||||
|
||||
.loadingTextDiv
|
||||
color: $textSecondaryColor
|
||||
font-size: 30px
|
||||
font-weight: 200
|
||||
Reference in new issue
Block a user