ohif-viewer/Packages/ohif-study-list/client/lib/openNewTab.js
Erik Ziegler ab4d4c9008 Work on refactoring measurements out of Lesion Tracker package
- Removed AssociatedStudies Collection
- Measurement API is generated from configuration files
- Data exchange methods are defined in configuration
2016-11-15 08:21:46 +01:00

27 lines
784 B
JavaScript

/**
* Opens a new tab in the tabbed studylist environment using
* a given study and new tab title.
*
* @param studyInstanceUid The UID of the Study to be opened
* @param title The title to be used for the tab heading
*/
openNewTab = function(studyInstanceUid, title) {
console.log('openNewTab');
// Generate a unique ID to represent this tab
// We can't just use the Mongo entry ID because
// then it will change after hot-reloading.
var contentid = Random.id();
// Update the ViewerData global object
ViewerData = window.ViewerData || ViewerData;
ViewerData[contentid] = {
title: title,
contentid: contentid,
studyInstanceUids: [studyInstanceUid]
};
// Switch to the new tab
switchToTab(contentid);
};