Implementing disabled handling for commands

This commit is contained in:
Bruno Alves de Faria authored and Erik Ziegler committed 2017-06-14 09:19:49 +02:00
1 parent 1a0729336b
commit 8aac5dc47d
13 files changed
+85 -117

No files matched your search

@@ -159,24 +159,23 @@ Template.toolbarSection.helpers({
id: 'previousDisplaySet',
title: 'Previous',
classes: 'imageViewerCommand',
buttonTemplateName: 'displaySetNavigation',
isNext: false
iconClasses: 'fa fa-toggle-up fa-fw'
});
buttonData.push({
id: 'nextDisplaySet',
title: 'Next',
classes: 'imageViewerCommand',
buttonTemplateName: 'displaySetNavigation',
isNext: true
iconClasses: 'fa fa-toggle-down fa-fw'
});
const { isPlaying } = OHIF.viewerbase.viewportUtils;
buttonData.push({
id: 'toggleCinePlay',
title: 'Toggle CINE Play',
title: () => isPlaying() ? 'Stop' : 'Play',
classes: 'imageViewerCommand',
buttonTemplateName: 'playClipButton',
active: OHIF.viewerbase.viewportUtils.isPlaying
iconClasses: () => ('fa fa-fw ' + (isPlaying() ? 'fa-stop' : 'fa-play')),
active: isPlaying
});
buttonData.push({
@@ -184,7 +183,6 @@ Template.toolbarSection.helpers({
title: 'CINE',
classes: 'imageViewerCommand',
iconClasses: 'fa fa-youtube-play',
disableFunction: OHIF.viewerbase.viewportUtils.hasMultipleFrames,
active: () => $('#cineDialog').is(':visible')
});
}