LT-251: Showing only one quick switck if there is no second viewport

This commit is contained in:
Bruno Alves de Faria authored and Erik Ziegler committed 2016-07-22 11:08:27 +02:00
1 parent 257f5cd38b
commit 5b930f8db2
5 files changed
+30 -10

No files matched your search

@@ -21,8 +21,12 @@
</div>
</div>
{{ >studySeriesQuickSwitch side="left" viewportIndex=0}}
{{ >studySeriesQuickSwitch side="right" viewportIndex=1}}
{{#if splitView}}
{{>studySeriesQuickSwitch side="right" viewportIndex=1}}
{{>studySeriesQuickSwitch side="left" viewportIndex=0}}
{{else}}
{{>studySeriesQuickSwitch side="middle" viewportIndex=0}}
{{/if}}
<div class="toolbarSectionEntry pull-right rm-l-1 p-x-1">
{{ >caseProgress }}
@@ -1,4 +1,17 @@
Template.toolbarSection.helpers({
// Returns true if the view shall be split in two viewports
splitView() {
// Stops here if layout manager is not defined yet
if (!window.layoutManager) {
return;
}
// Run this computation everytime the viewports are updated
Session.get('LayoutManagerUpdated');
return layoutManager.viewportData.length > 1;
},
leftSidebarToggleButtonData() {
const instance = Template.instance();
return {
@@ -14,6 +27,7 @@ Template.toolbarSection.helpers({
}]
};
},
rightSidebarToggleButtonData() {
const instance = Template.instance();
return {
@@ -35,6 +49,7 @@ Template.toolbarSection.helpers({
}]
};
},
toolbarButtons: function() {
var buttonData = [];
buttonData.push({