LT-251: Showing only one quick switck if there is no second viewport
This commit is contained in:
parent
257f5cd38b
commit
5b930f8db2
@ -1,7 +1,7 @@
|
|||||||
<template name="studySeriesQuickSwitch">
|
<template name="studySeriesQuickSwitch">
|
||||||
<div class="quickSwitchWrapper {{side}}">
|
<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="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 'left'}}pull-right{{else}}pull-left{{/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="label">Study</div>
|
||||||
<div class="studySwitch">
|
<div class="studySwitch">
|
||||||
<div class="studyBox"></div>
|
<div class="studyBox"></div>
|
||||||
@ -12,16 +12,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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)}}
|
{{#let thumbnailsList=(studyThumbnails currentStudy)}}
|
||||||
<div class="label">Series</div>
|
<div class="label">Series</div>
|
||||||
<div class="seriesSwitch clearfix">
|
<div class="seriesSwitch clearfix">
|
||||||
{{#each thumbnail in thumbnailsList}}
|
{{#each thumbnail in thumbnailsList}}
|
||||||
{{#if lt @index 8}}
|
{{#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}}
|
{{else}}
|
||||||
{{#if eq @index 8}}
|
{{#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}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|||||||
@ -9,7 +9,9 @@ $seriesSpacing = 2px
|
|||||||
|
|
||||||
&.middle
|
&.middle
|
||||||
left: 50%
|
left: 50%
|
||||||
transform(translateX(-50%))
|
|
||||||
|
.quickSwitch
|
||||||
|
transform(translateX(-50%))
|
||||||
|
|
||||||
&.left
|
&.left
|
||||||
border-right: 1px solid $uiBorderColor
|
border-right: 1px solid $uiBorderColor
|
||||||
|
|||||||
@ -21,8 +21,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ >studySeriesQuickSwitch side="left" viewportIndex=0}}
|
{{#if splitView}}
|
||||||
{{ >studySeriesQuickSwitch side="right" viewportIndex=1}}
|
{{>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">
|
<div class="toolbarSectionEntry pull-right rm-l-1 p-x-1">
|
||||||
{{ >caseProgress }}
|
{{ >caseProgress }}
|
||||||
|
|||||||
@ -1,4 +1,17 @@
|
|||||||
Template.toolbarSection.helpers({
|
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() {
|
leftSidebarToggleButtonData() {
|
||||||
const instance = Template.instance();
|
const instance = Template.instance();
|
||||||
return {
|
return {
|
||||||
@ -14,6 +27,7 @@ Template.toolbarSection.helpers({
|
|||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
rightSidebarToggleButtonData() {
|
rightSidebarToggleButtonData() {
|
||||||
const instance = Template.instance();
|
const instance = Template.instance();
|
||||||
return {
|
return {
|
||||||
@ -35,6 +49,7 @@ Template.toolbarSection.helpers({
|
|||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
toolbarButtons: function() {
|
toolbarButtons: function() {
|
||||||
var buttonData = [];
|
var buttonData = [];
|
||||||
buttonData.push({
|
buttonData.push({
|
||||||
|
|||||||
@ -2,8 +2,7 @@
|
|||||||
* Boolean helper to identify if a series instance is active in some viewport
|
* Boolean helper to identify if a series instance is active in some viewport
|
||||||
*/
|
*/
|
||||||
Template.registerHelper('isSeriesActive', (seriesInstanceUid, viewportIndex) => {
|
Template.registerHelper('isSeriesActive', (seriesInstanceUid, viewportIndex) => {
|
||||||
// Register dependency on Session key that is changed
|
// Run this computation everytime the viewports are updated
|
||||||
// when viewports are updated
|
|
||||||
Session.get('LayoutManagerUpdated');
|
Session.get('LayoutManagerUpdated');
|
||||||
|
|
||||||
// Stop here if layoutManager is not defined yet
|
// Stop here if layoutManager is not defined yet
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user