Skip to content

Commit

Permalink
Fix sequence flow bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tuantruong625 committed Feb 25, 2019
1 parent 5e81ceb commit b5dfa8a
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions src/components/nodes/sequenceFlow/sequenceFlow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,28 @@ export default {
renderConditionExpression() {
return !this.node.definition.conditionExpression.body ? '' : this.node.definition.conditionExpression.body;
},
createLabel() {
if (typeof this.node.definition.conditionExpression === 'undefined') {
return;
}
this.shape.labels([{
attrs: {
text: {
text: this.renderConditionExpression(),
},
},
position: expressionPosition,
}]);
},
},
mounted() {
this.shape = new joint.shapes.standard.Link({
router: {
name: 'orthogonal',
},
});
this.shape.labels([{
attrs: {
text: {
text: this.renderConditionExpression(),
},
},
position: expressionPosition,
}]);
this.createLabel();
},
};
</script>

0 comments on commit b5dfa8a

Please sign in to comment.