Skip to content

Commit

Permalink
Use OverlayTrigger only when keypad jogging is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
cheton committed Apr 8, 2017
1 parent 589d0b8 commit 72f0579
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/web/widgets/Axes/Toolbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ class ToolbarButton extends Component {
)}
>
<div className="btn-group pull-left">
{(canClick && keypadJogging) &&
<OverlayTrigger
overlay={keypadTooltip()}
placement="bottom"
Expand All @@ -166,6 +167,24 @@ class ToolbarButton extends Component {
{i18n._('Keypad')}
</button>
</OverlayTrigger>
}
{!(canClick && keypadJogging) &&
<button
type="button"
className={classNames(
'btn',
'btn-xs',
'btn-default',
{ 'btn-select': keypadJogging }
)}
onClick={actions.toggleKeypadJogging}
disabled={!canClick}
>
<i className="fa fa-keyboard-o" />
<span className="space" />
{i18n._('Keypad')}
</button>
}
</div>
<div className="btn-group pull-right">
<DropdownButton
Expand Down

0 comments on commit 72f0579

Please sign in to comment.