feat(extension-cornerstone): Add additional tools: Magnify, ROI Window, Probe, Ellipse, Rectangle, Invert, Rotate Right, Flip H, Flip V, Clear

This commit is contained in:
Evren Ozkan authored and Erik Ziegler committed 2019-07-08 13:49:56 +02:00
1 parent 5ac9048ef0
commit dd6acb2d03
8 files changed
+166 -26

No files matched your search

+2 -7
View File
@@ -1,11 +1,7 @@
import './ToolbarRow.css';
import React, { Component } from 'react';
import {
RoundedButtonGroup,
ToolbarButton,
ExpandableToolMenu,
} from 'react-viewerbase';
import { ExpandableToolMenu, RoundedButtonGroup, ToolbarButton } from 'react-viewerbase';
import { commandsManager, extensionManager } from './../App.js';
import ConnectedCineDialog from './ConnectedCineDialog';
@@ -155,7 +151,7 @@ class ToolbarRow extends Component {
*/
function _getButtonComponents(toolbarButtons, activeButtons) {
return toolbarButtons.map((button, index) => {
if (button.buttons) {
if (button.buttons && button.buttons.length) {
// Iterate over button definitions and update `onClick` behavior
const childButtons = button.buttons.map(childButton => {
childButton.onClick = _handleToolbarButtonClick.bind(this, childButton);
@@ -171,7 +167,6 @@ function _getButtonComponents(toolbarButtons, activeButtons) {
/>
);
}
return (
<ToolbarButton
key={button.id}