clientIO / joint

A proven SVG-based JavaScript diagramming library powering exceptional UIs
https://jointjs.com
Mozilla Public License 2.0
4.73k stars 853 forks source link

feat(dia.Element): add getPortGroupNames() #2629

Closed kumilingus closed 4 months ago

kumilingus commented 7 months ago

Description

Add a convenient method for those who want to iterate over all port groups.

element.getPortGroupNames().forEach(group => {
   const groupPortPositions = element.getPortsPositions(group);
  /* ... */ 
});

Documentation

element.getPortGroupNames()

Returns an array of port group names of the element. It returns all port group names defined on the element regardless of whether the port group has any ports or not.