src/base-components/ModifiedDefaultLinkModel.js
/**
   * @helper This is a helper method for the two overridden methods below
   * (setSourcePort and setTargetPort).
   */
@helper This is a helper method for the two overridden methods below
(setSourcePort and setTargetPort).
@helper This is a helper method for the two overridden methods below ( setSourcePort and setTargetPort ) .
generateLabelIfPossible() {
    if (!this.targetPort
      || !this.sourcePort
      || this.sourcePort.parent.type === 'context'
    ) {
      return;
    }
    this.addLabel(`${this.sourcePort.label} ––> ${this.targetPort.label}`);
    const [node1, node2] = [this.getSourcePort().getNode(), this.getTargetPort().getNode()];
    if (node1 && node2) {
      store.dispatch(mapLinkToNodePair(this, node1, node2));
    }
    if (this.sourcePort.label === 'OUT' && this.targetPort.label === 'IN') {
      store.dispatch(
        addTransition({
          sourceID: this.sourcePort.parent.id,
          targetID: this.targetPort.parent.id,
        }),
      );
    } else {
      store.dispatch(
        addAction({
          sourceID: this.sourcePort.parent.id,
          targetID: this.targetPort.parent.id,
          sourceActionName: this.sourcePort.label,
          targetLabelName: this.targetPort.label.substring(0, this.targetPort.label.indexOf(' –– ')),
        }),
      );
    }
  }
generateLabelIfPossible ( ) { if ( ! this . targetPort || ! this . sourcePort || this . sourcePort . parent . type === 'context' ) { return ; } this . addLabel ( ` ${ this . sourcePort . label } is .tar g etPort.lab e l}`); const [ node1 , node2 ] = [ this . getSourcePort ( ) . getNode ( ) , this . getTargetPort ( ) . getNode ( ) ] ; if ( node1 && node2 ) { store . dispatch ( mapLinkToNodePair ( this , node1 , node2 ) ) ; } if ( this . sourcePort . label === 'OUT' && this . targetPort . label === 'IN' ) { store . dispatch ( addTransition ( { sourceID : this . sourcePort . parent . id , targetID : this . targetPort . parent . id , } ) , ) ; } else { store . dispatch ( addAction ( { sourceID : this . sourcePort . parent . id , targetID : this . targetPort . parent . id , sourceActionName : this . sourcePort . label , targetLabelName : this . targetPort . label . substring ( 0 , this . targetPort . label . indexOf ( ' –– ')), } ) , ) ; } }
@helper This is a helper method for the two overridden methods below
 (setSourcePort and setTargetPort).
@helper This is a helper method for the two overridden methods below ( setSourcePort and setTargetPort ) .
// eslint-disable-next-line max-len // this.addLabel(`${this.sourcePort.parent.name}.${this.sourcePort.label} -–> ${this.targetPort.parent.name}.${this.targetPort.label}`); // $FlowFixMe