fix toolbar buttons
This commit is contained in:
parent
2e06b652b3
commit
6adc31ce40
@ -5,8 +5,7 @@
|
|||||||
{{>roundedButtonGroup leftSidebarToggleButtonData}}
|
{{>roundedButtonGroup leftSidebarToggleButtonData}}
|
||||||
</div>
|
</div>
|
||||||
{{> toolbarSectionTools
|
{{> toolbarSectionTools
|
||||||
toolbarButtons=toolbarButtons
|
toolbarButtons=toolbarButtons}}
|
||||||
extraToolbarButtons=extraToolbarButtons}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -1,6 +1,14 @@
|
|||||||
import { OHIF } from 'meteor/ohif:core';
|
import { OHIF } from 'meteor/ohif:core';
|
||||||
import 'meteor/ohif:viewerbase';
|
import 'meteor/ohif:viewerbase';
|
||||||
|
|
||||||
|
Template.toolbarSection.onCreated(() => {
|
||||||
|
const instance = Template.instance();
|
||||||
|
|
||||||
|
if (OHIF.uiSettings.leftSidebarOpen) {
|
||||||
|
instance.data.state.set('leftSidebar', 'studies');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Template.toolbarSection.helpers({
|
Template.toolbarSection.helpers({
|
||||||
leftSidebarToggleButtonData() {
|
leftSidebarToggleButtonData() {
|
||||||
const instance = Template.instance();
|
const instance = Template.instance();
|
||||||
@ -10,7 +18,7 @@ Template.toolbarSection.helpers({
|
|||||||
value: instance.data.state,
|
value: instance.data.state,
|
||||||
options: [{
|
options: [{
|
||||||
value: 'studies',
|
value: 'studies',
|
||||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-studies',
|
svgLink: 'packages/ohif_viewerbase/assets/icons.svg#icon-studies',
|
||||||
svgWidth: 15,
|
svgWidth: 15,
|
||||||
svgHeight: 13,
|
svgHeight: 13,
|
||||||
bottomLabel: 'Series'
|
bottomLabel: 'Series'
|
||||||
@ -19,40 +27,99 @@ Template.toolbarSection.helpers({
|
|||||||
},
|
},
|
||||||
|
|
||||||
toolbarButtons() {
|
toolbarButtons() {
|
||||||
|
const extraTools = [];
|
||||||
|
|
||||||
|
extraTools.push({
|
||||||
|
id: 'stackScroll',
|
||||||
|
title: 'Stack Scroll',
|
||||||
|
classes: 'imageViewerTool',
|
||||||
|
iconClasses: 'fa fa-bars'
|
||||||
|
});
|
||||||
|
|
||||||
|
extraTools.push({
|
||||||
|
id: 'magnify',
|
||||||
|
title: 'Magnify',
|
||||||
|
classes: 'imageViewerTool toolbarSectionButton',
|
||||||
|
iconClasses: 'fa fa-circle'
|
||||||
|
});
|
||||||
|
|
||||||
|
extraTools.push({
|
||||||
|
id: 'wwwcRegion',
|
||||||
|
title: 'ROI Window',
|
||||||
|
classes: 'imageViewerTool',
|
||||||
|
iconClasses: 'fa fa-square'
|
||||||
|
});
|
||||||
|
|
||||||
|
extraTools.push({
|
||||||
|
id: 'dragProbe',
|
||||||
|
title: 'Probe',
|
||||||
|
classes: 'imageViewerTool',
|
||||||
|
iconClasses: 'fa fa-dot-circle-o'
|
||||||
|
});
|
||||||
|
|
||||||
|
extraTools.push({
|
||||||
|
id: 'ellipticalRoi',
|
||||||
|
title: 'Ellipse',
|
||||||
|
classes: 'imageViewerTool',
|
||||||
|
iconClasses: 'fa fa-circle-o'
|
||||||
|
});
|
||||||
|
|
||||||
|
extraTools.push({
|
||||||
|
id: 'rectangleRoi',
|
||||||
|
title: 'Rectangle',
|
||||||
|
classes: 'imageViewerTool',
|
||||||
|
iconClasses: 'fa fa-square-o'
|
||||||
|
});
|
||||||
|
|
||||||
|
extraTools.push({
|
||||||
|
id: 'invert',
|
||||||
|
title: 'Invert',
|
||||||
|
classes: 'imageViewerCommand',
|
||||||
|
iconClasses: 'fa fa-adjust'
|
||||||
|
});
|
||||||
|
|
||||||
|
extraTools.push({
|
||||||
|
id: 'clearTools',
|
||||||
|
title: 'Clear',
|
||||||
|
classes: 'imageViewerCommand',
|
||||||
|
iconClasses: 'fa fa-trash'
|
||||||
|
});
|
||||||
|
|
||||||
var buttonData = [];
|
var buttonData = [];
|
||||||
|
|
||||||
buttonData.push({
|
buttonData.push({
|
||||||
id: 'zoom',
|
id: 'zoom',
|
||||||
title: 'Zoom',
|
title: 'Zoom',
|
||||||
classes: 'imageViewerTool',
|
classes: 'imageViewerTool',
|
||||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-zoom'
|
svgLink: 'packages/ohif_viewerbase/assets/icons.svg#icon-tools-zoom'
|
||||||
});
|
});
|
||||||
|
|
||||||
buttonData.push({
|
buttonData.push({
|
||||||
id: 'wwwc',
|
id: 'wwwc',
|
||||||
title: 'Levels',
|
title: 'Levels',
|
||||||
classes: 'imageViewerTool',
|
classes: 'imageViewerTool',
|
||||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-levels'
|
svgLink: 'packages/ohif_viewerbase/assets/icons.svg#icon-tools-levels'
|
||||||
});
|
});
|
||||||
|
|
||||||
buttonData.push({
|
buttonData.push({
|
||||||
id: 'pan',
|
id: 'pan',
|
||||||
title: 'Pan',
|
title: 'Pan',
|
||||||
classes: 'imageViewerTool',
|
classes: 'imageViewerTool',
|
||||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-pan'
|
svgLink: 'packages/ohif_viewerbase/assets/icons.svg#icon-tools-pan'
|
||||||
});
|
});
|
||||||
|
|
||||||
buttonData.push({
|
buttonData.push({
|
||||||
id: 'length',
|
id: 'length',
|
||||||
title: 'Length',
|
title: 'Length',
|
||||||
classes: 'imageViewerTool toolbarSectionButton',
|
classes: 'imageViewerTool toolbarSectionButton',
|
||||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-measure-temp'
|
svgLink: 'packages/ohif_viewerbase/assets/icons.svg#icon-tools-measure-temp'
|
||||||
});
|
});
|
||||||
|
|
||||||
buttonData.push({
|
buttonData.push({
|
||||||
id: 'annotate',
|
id: 'annotate',
|
||||||
title: 'Annotate',
|
title: 'Annotate',
|
||||||
classes: 'imageViewerTool',
|
classes: 'imageViewerTool',
|
||||||
svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-measure-non-target'
|
svgLink: 'packages/ohif_viewerbase/assets/icons.svg#icon-tools-measure-non-target'
|
||||||
});
|
});
|
||||||
|
|
||||||
buttonData.push({
|
buttonData.push({
|
||||||
@ -69,19 +136,39 @@ Template.toolbarSection.helpers({
|
|||||||
iconClasses: 'fa fa-undo'
|
iconClasses: 'fa fa-undo'
|
||||||
});
|
});
|
||||||
|
|
||||||
buttonData.push({
|
if (!OHIF.uiSettings.displayEchoUltrasoundWorkflow) {
|
||||||
id: 'toggleCinePlay',
|
|
||||||
title: 'Toggle CINE Play',
|
|
||||||
classes: 'imageViewerCommand',
|
|
||||||
buttonTemplateName: 'playClipButton'
|
|
||||||
});
|
|
||||||
|
|
||||||
buttonData.push({
|
buttonData.push({
|
||||||
id: 'toggleCineDialog',
|
id: 'previousDisplaySet',
|
||||||
title: 'CINE',
|
title: 'Previous',
|
||||||
classes: 'imageViewerCommand',
|
classes: 'imageViewerCommand',
|
||||||
iconClasses: 'fa fa-youtube-play'
|
buttonTemplateName: 'displaySetNavigation',
|
||||||
});
|
isNext: false
|
||||||
|
});
|
||||||
|
|
||||||
|
buttonData.push({
|
||||||
|
id: 'nextDisplaySet',
|
||||||
|
title: 'Next',
|
||||||
|
classes: 'imageViewerCommand',
|
||||||
|
buttonTemplateName: 'displaySetNavigation',
|
||||||
|
isNext: true
|
||||||
|
});
|
||||||
|
|
||||||
|
buttonData.push({
|
||||||
|
id: 'toggleCinePlay',
|
||||||
|
title: 'Toggle CINE Play',
|
||||||
|
classes: 'imageViewerCommand',
|
||||||
|
buttonTemplateName: 'playClipButton'
|
||||||
|
});
|
||||||
|
|
||||||
|
buttonData.push({
|
||||||
|
id: 'toggleCineDialog',
|
||||||
|
title: 'CINE',
|
||||||
|
classes: 'imageViewerCommand',
|
||||||
|
iconClasses: 'fa fa-youtube-play',
|
||||||
|
disableFunction: OHIF.viewerbase.viewportUtils.hasMultipleFrames
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
buttonData.push({
|
buttonData.push({
|
||||||
id: 'layout',
|
id: 'layout',
|
||||||
@ -90,71 +177,17 @@ Template.toolbarSection.helpers({
|
|||||||
buttonTemplateName: 'layoutButton'
|
buttonTemplateName: 'layoutButton'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
buttonData.push({
|
||||||
|
id: 'toggleMore',
|
||||||
|
title: 'More',
|
||||||
|
classes: 'rp-x-1 rm-l-3',
|
||||||
|
svgLink: 'packages/ohif_viewerbase/assets/icons.svg#icon-tools-more',
|
||||||
|
subTools: extraTools
|
||||||
|
});
|
||||||
|
|
||||||
return buttonData;
|
return buttonData;
|
||||||
},
|
},
|
||||||
|
|
||||||
extraToolbarButtons() {
|
|
||||||
let buttonData = [];
|
|
||||||
|
|
||||||
buttonData.push({
|
|
||||||
id: 'stackScroll',
|
|
||||||
title: 'Stack Scroll',
|
|
||||||
classes: 'imageViewerTool',
|
|
||||||
iconClasses: 'fa fa-bars'
|
|
||||||
});
|
|
||||||
|
|
||||||
buttonData.push({
|
|
||||||
id: 'magnify',
|
|
||||||
title: 'Magnify',
|
|
||||||
classes: 'imageViewerTool toolbarSectionButton',
|
|
||||||
iconClasses: 'fa fa-circle'
|
|
||||||
});
|
|
||||||
|
|
||||||
buttonData.push({
|
|
||||||
id: 'wwwcRegion',
|
|
||||||
title: 'ROI Window',
|
|
||||||
classes: 'imageViewerTool',
|
|
||||||
iconClasses: 'fa fa-square'
|
|
||||||
});
|
|
||||||
|
|
||||||
buttonData.push({
|
|
||||||
id: 'dragProbe',
|
|
||||||
title: 'Probe',
|
|
||||||
classes: 'imageViewerTool',
|
|
||||||
iconClasses: 'fa fa-dot-circle-o'
|
|
||||||
});
|
|
||||||
|
|
||||||
buttonData.push({
|
|
||||||
id: 'ellipticalRoi',
|
|
||||||
title: 'Ellipse',
|
|
||||||
classes: 'imageViewerTool',
|
|
||||||
iconClasses: 'fa fa-circle-o'
|
|
||||||
});
|
|
||||||
|
|
||||||
buttonData.push({
|
|
||||||
id: 'rectangleRoi',
|
|
||||||
title: 'Rectangle',
|
|
||||||
classes: 'imageViewerTool',
|
|
||||||
iconClasses: 'fa fa-square-o'
|
|
||||||
});
|
|
||||||
|
|
||||||
buttonData.push({
|
|
||||||
id: 'invert',
|
|
||||||
title: 'Invert',
|
|
||||||
classes: 'imageViewerCommand',
|
|
||||||
iconClasses: 'fa fa-adjust'
|
|
||||||
});
|
|
||||||
|
|
||||||
buttonData.push({
|
|
||||||
id: 'clearTools',
|
|
||||||
title: 'Clear',
|
|
||||||
classes: 'imageViewerCommand',
|
|
||||||
iconClasses: 'fa fa-trash'
|
|
||||||
});
|
|
||||||
|
|
||||||
return buttonData;
|
|
||||||
},
|
|
||||||
|
|
||||||
hangingProtocolButtons() {
|
hangingProtocolButtons() {
|
||||||
let buttonData = [];
|
let buttonData = [];
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,6 @@
|
|||||||
theme('border-bottom', '%s solid $uiBorderColor' % $uiBorderThickness)
|
theme('border-bottom', '%s solid $uiBorderColor' % $uiBorderThickness)
|
||||||
flex: 0 0 auto
|
flex: 0 0 auto
|
||||||
height: $toolbarHeight
|
height: $toolbarHeight
|
||||||
overflow: hidden
|
|
||||||
padding-top: 6px
|
padding-top: 6px
|
||||||
position: relative
|
position: relative
|
||||||
transition(height 300ms ease)
|
transition(height 300ms ease)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user