AWV-3: Adding current state to display set navigation buttons on CINE dialog

This commit is contained in:
Bruno Alves de Faria 2016-09-05 10:43:09 -03:00
parent 6b86b8d2dc
commit 36da38283a
2 changed files with 7 additions and 2 deletions

View File

@ -4,10 +4,10 @@
<h5>CINE Controls</h5> <h5>CINE Controls</h5>
<div class="cine-navigation"> <div class="cine-navigation">
<div class="btn-group"> <div class="btn-group">
{{#button action='displaySetPrevious' title='Previous display set'}} {{#button disabled=(displaySetDisabled false) action='displaySetPrevious' title='Previous display set'}}
<i class="fa fa-toggle-up"></i> <i class="fa fa-toggle-up"></i>
{{/button}} {{/button}}
{{#button action='displaySetNext' title='Next display set'}} {{#button disabled=(displaySetDisabled true) action='displaySetNext' title='Next display set'}}
<i class="fa fa-toggle-down"></i> <i class="fa fa-toggle-down"></i>
{{/button}} {{/button}}
</div> </div>

View File

@ -134,5 +134,10 @@ Template.cineDialog.helpers({
framerate() { framerate() {
Session.get('UpdateCINE'); Session.get('UpdateCINE');
return OHIF.viewer.cine.framesPerSecond.toFixed(1); return OHIF.viewer.cine.framesPerSecond.toFixed(1);
},
displaySetDisabled(isNext) {
Session.get('LayoutManagerUpdated');
return !OHIF.viewer.canMoveDisplaySets(isNext) ? 'disabled' : '';
} }
}); });