LT-251: Disabling drag and drop from series and adding click-to-select behavior for quick switch areas
This commit is contained in:
1 parent
97c8c2b554
commit
e3fc56c0f4
13 files changed
+200
-154
No files matched your search
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* Boolean helper to identify if a series instance is active in some viewport
|
||||
*/
|
||||
Template.registerHelper('isSeriesActive', (seriesInstanceUid, viewportIndex) => {
|
||||
// Register dependency on Session key that is changed
|
||||
// when viewports are updated
|
||||
Session.get('LayoutManagerUpdated');
|
||||
|
||||
// Stop here if layoutManager is not defined yet
|
||||
if (!layoutManager) {
|
||||
return;
|
||||
}
|
||||
|
||||
let viewportData;
|
||||
if (_.isUndefined(viewportIndex)) {
|
||||
viewportData = layoutManager.viewportData;
|
||||
} else {
|
||||
viewportData = [layoutManager.viewportData[viewportIndex]];
|
||||
}
|
||||
|
||||
let result = false;
|
||||
_.each(viewportData, data => {
|
||||
if (data.seriesInstanceUid === seriesInstanceUid) {
|
||||
result = true;
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
});
|
||||
Reference in new issue
Block a user