getLinks

returns a collection of Diagram links

DataCollection getLinks();
DataCollectiona collection of links

Example

webix.ui({
  view: "diagram",
  id: "diagram1"
  links: [
    // other links
    { source:"1.1.1", target:"1.1.1.1", mode:"child" },
    { source:"1.1.1.1", target:"1.1.1.2", mode:"sibling" },
  ],
});
 
const linksCollection = $$("diagram1").getLinks();

Details

You can work with the collection using the dedicated API. For example, you can get the links array by serializing the collection:

const linksArray = $$("diagram1").getLinks().serialize();
/*
[
  { id: 161968034646, source: "core", target: "diagram" },
  { 
    $arrowCss: "batman", 
    arrow: ["300,101", "298,104"], 
    id: 1619680346462
    source: "core"
    target: "kanban"
  }
  // ...
]
*/
See also
Back to top