Closed rzfzr closed 2 years ago
Nobody has any clue on this?
Done, you have to edit "ports" aswell as portsIn or out, it is an object, not a list, so I add the new key and dele the old, I made a method besides addInPort...
renamePort(oldName: string, newName: string): void {
const portInIndex = this.portsIn.findIndex(p => p.getOptions().name === oldName)
this.portsIn[portInIndex].getOptions().name = newName
this.portsIn[portInIndex].getOptions().label = newName
this.ports[newName] = this.ports[oldName];
delete this.ports[oldName];
}
It somehow keeps the links connected aswell
I changed the port name as #934 , however, I can't link the changed ports.
canLinkToPort is not even being called. engine.repaintCanvas seems to make no difference.
Thanks