LT-251: Showing only one quick switck if there is no second viewport
This commit is contained in:
1 parent
257f5cd38b
commit
5b930f8db2
5 files changed
+30
-10
No files matched your search
+5
-5
@@ -1,7 +1,7 @@
|
||||
<template name="studySeriesQuickSwitch">
|
||||
<div class="quickSwitchWrapper {{side}}">
|
||||
<div class="quickSwitch js-quick-switch clearfix rp-t-1 {{#if eq side 'left'}}rp-r-3{{else}}rp-l-3{{/if}}">
|
||||
<div class="switchSection switchSectionStudy rp-x-1 {{#if eq side 'left'}}pull-right{{else}}pull-left{{/if}}">
|
||||
<div class="quickSwitch js-quick-switch clearfix rp-t-1 {{#if eq side 'right'}}rp-l-3{{/if}}{{#if eq side 'left'}}rp-r-3{{/if}}">
|
||||
<div class="switchSection switchSectionStudy rp-x-1 {{#if eq side 'right'}}pull-left{{else}}pull-right{{/if}}">
|
||||
<div class="label">Study</div>
|
||||
<div class="studySwitch">
|
||||
<div class="studyBox"></div>
|
||||
@@ -12,16 +12,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="switchSection switchSectionSeries rp-x-1 {{#if eq side 'left'}}pull-right{{else}}pull-left{{/if}}">
|
||||
<div class="switchSection switchSectionSeries rp-x-1 {{#if eq side 'right'}}pull-left{{else}}pull-right{{/if}}">
|
||||
{{#let thumbnailsList=(studyThumbnails currentStudy)}}
|
||||
<div class="label">Series</div>
|
||||
<div class="seriesSwitch clearfix">
|
||||
{{#each thumbnail in thumbnailsList}}
|
||||
{{#if lt @index 8}}
|
||||
<div class="seriesItem {{#if eq side 'left'}}pull-right{{else}}pull-left{{/if}} {{#if isSeriesActive thumbnail.stack.seriesInstanceUid viewportIndex}}active{{/if}}"></div>
|
||||
<div class="seriesItem {{#if eq side 'right'}}pull-left{{else}}pull-right{{/if}} {{#if isSeriesActive thumbnail.stack.seriesInstanceUid viewportIndex}}active{{/if}}"></div>
|
||||
{{else}}
|
||||
{{#if eq @index 8}}
|
||||
<div class="seriesItem count {{#if eq side 'left'}}pull-right{{else}}pull-left{{/if}}">{{thumbnailsList.length}}</div>
|
||||
<div class="seriesItem count {{#if eq side 'right'}}pull-left{{else}}pull-right{{/if}}">{{thumbnailsList.length}}</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
|
||||
+3
-1
@@ -9,7 +9,9 @@ $seriesSpacing = 2px
|
||||
|
||||
&.middle
|
||||
left: 50%
|
||||
transform(translateX(-50%))
|
||||
|
||||
.quickSwitch
|
||||
transform(translateX(-50%))
|
||||
|
||||
&.left
|
||||
border-right: 1px solid $uiBorderColor
|
||||
|
||||
@@ -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({
|
||||
|
||||
Reference in new issue
Block a user