Allowing sections to work outside components
This commit is contained in:
1 parent
dd745e3f65
commit
2a5699a5b7
3 files changed
+41
-21
No files matched your search
@@ -40,3 +40,14 @@ OHIF.blaze.getParentComponent = (view, property='_component') => {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Search for the parent template of the given view
|
||||
OHIF.blaze.getParentTemplateView = view => {
|
||||
let currentView = view;
|
||||
while (currentView) {
|
||||
currentView = currentView.originalParentView || currentView.parentView;
|
||||
if (currentView.name.indexOf('Template.') > -1) {
|
||||
return currentView;
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user