Skip to content

Commit

Permalink
Merge pull request #2726 from asashour/removeTodo
Browse files Browse the repository at this point in the history
fix(studio): remove double clicking message
  • Loading branch information
EFF committed Jan 6, 2020
2 parents 2b32a28 + 5b20aa7 commit 50e8f06
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/bp/ui-studio/src/web/views/FlowBuilder/diagram/index.tsx
Expand Up @@ -102,13 +102,11 @@ class Diagram extends Component<Props> {
componentDidMount() {
this.props.fetchFlows()
ReactDOM.findDOMNode(this.diagramWidget).addEventListener('click', this.onDiagramClick)
ReactDOM.findDOMNode(this.diagramWidget).addEventListener('dblclick', this.onDiagramDoubleClick)
document.getElementById('diagramContainer').addEventListener('keydown', this.onKeyDown)
}

componentWillUnmount() {
ReactDOM.findDOMNode(this.diagramWidget).removeEventListener('click', this.onDiagramClick)
ReactDOM.findDOMNode(this.diagramWidget).removeEventListener('dblclick', this.onDiagramDoubleClick)
document.getElementById('diagramContainer').removeEventListener('keydown', this.onKeyDown)
}

Expand Down Expand Up @@ -336,26 +334,6 @@ class Diagram extends Component<Props> {
this.props.createFlow(name + '.flow.json')
}

onDiagramDoubleClick = (event?: MouseEvent) => {
if (event) {
// We only keep 3 events for dbl click: full flow, standard nodes and skills. Adding temporarily router so it's editable
const target = this.diagramWidget.getMouseElement(event)
if (
target &&
!(
target.model instanceof StandardNodeModel ||
target.model instanceof SkillCallNodeModel ||
target.model instanceof RouterNodeModel
)
) {
return
}
}

// TODO: delete this once 12.2.1 is out
toastInfo('Pssst! Just click once a node to inspect it, no need to double-click anymore.', Timeout.LONG)
}

canTargetOpenInspector = target => {
if (!target) {
return false
Expand Down

0 comments on commit 50e8f06

Please sign in to comment.