Skip to content

Commit

Permalink
fix(flow): fixed flow-wide links that picked selected node instead
Browse files Browse the repository at this point in the history
  • Loading branch information
allardy committed Mar 7, 2019
1 parent a46905e commit 462b1cc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/bp/ui-studio/src/web/views/FlowBuilder/diagram/index.jsx
Expand Up @@ -487,17 +487,22 @@ export default class FlowBuilder extends Component {
}
}

handleFlowWideClicked = () => {
this.activeModel.clearSelection()
this.onDiagramDoubleClick()
}

renderCatchAllInfo() {
const nbOnReceive = _.get(this.props.currentFlow, 'catchAll.onReceive.length', 0)
const nbNext = _.get(this.props.currentFlow, 'catchAll.next.length', 0)

return (
<div>
<Button bsStyle="link" onClick={this.onDiagramDoubleClick}>
<Button bsStyle="link" onClick={this.handleFlowWideClicked}>
<Label bsStyle={nbOnReceive > 0 ? 'danger' : 'default'}>{nbOnReceive}</Label> flow-wide onReceive
</Button>

<Button bsStyle="link" onClick={this.onDiagramDoubleClick}>
<Button bsStyle="link" onClick={this.handleFlowWideClicked}>
<Label bsStyle={nbNext > 0 ? 'primary' : 'default'}>{nbNext}</Label> flow-wide
{nbNext === 1 ? ' transition' : ' transitions'}
</Button>
Expand Down

0 comments on commit 462b1cc

Please sign in to comment.