Quantcast
Channel: Northwoods Software - Latest topics
Viewing all articles
Browse latest Browse all 7425

Links names created dynamically using linkdrawn listener

$
0
0

@ahlam wrote:

Hi ,
please can you tell me what am I missing .. I ve added name link that way but didnt work .

myDiagram.addDiagramListener("LinkDrawn", e => {
  if (this.state.selectedLinkOption == "pipe") {
    e.subject.category = "pipe";
    e.subject.name= "pipe"
    console.log(" e.subject.name", e.subject.name);
    EquipActions.getEquipementByCategory("pipe", this.props.token);
  } else {
    e.subject.category = "connector";
    e.subject.name= "connector";
    EquipActions.getEquipementByCategory("connector", this.props.token);
  }
  let network = JSON.parse(myDiagram.model.toJson());

  this.setState(
    {
      //isConnectorModalOption: true,
      selectedLink: network.linkDataArray[network.linkDataArray.length - 1]
    },
    function() {}
  );
});

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7425

Latest Images

Trending Articles



Latest Images