This is the data structure associated with all nodes. It contains the children and relations you asked for.
{
"id": "http://semiodesk.com/furniture-ontology/Shelf",
"color": "#005a9c",
"label": "Shelf",
"attributes": [],
"relations": [
{
"id": "http://semiodesk.com/furniture-ontology/isCompatibleTo",
"label": "isCompatibleTo",
"domain": {
"id": "http://semiodesk.com/furniture-ontology/Shelf"
},
"range": {
"id": "http://semiodesk.com/furniture-ontology/Wardrobe"
}
}
],
"children": [
{
"id": "http://semiodesk.com/furniture-ontology/Billy",
"color": "#005a9c",
"label": "Billy",
"attributes": [],
"relations": [],
"children": null,
"hasSubClasses": false,
"images": [
{
"url": "https://commons.wikimedia.org/w/thumb.php?f=Bookcase.jpg&w=256",
"__gohashid": 5485
}
],
"__gohashid": 5453,
"location": {
"x": 0,
"y": 761.0913899932318,
"v": false
}
},
{
"id": "http://semiodesk.com/furniture-ontology/Gersby",
"color": "#005a9c",
"label": "Gersby",
"attributes": [],
"relations": [],
"children": null,
"hasSubClasses": false,
"images": [],
"__gohashid": 5498,
"location": {
"x": 282.5228474983079,
"y": 761.0913899932318,
"v": false
}
},
{
"id": "http://semiodesk.com/furniture-ontology/Kallax",
"color": "#005a9c",
"label": "Kallax",
"attributes": [],
"relations": [],
"children": null,
"hasSubClasses": false,
"images": [],
"__gohashid": 5536,
"location": {
"x": 385.9465739028659,
"y": 761.0913899932318,
"v": false
}
}
],
"hasSubClasses": true,
"images": [],
"__gohashid": 1210,
"location": {
"x": 195.86147054518295,
"y": 589.5685424949238,
"v": false
},
"isTreeExpanded": true,
"visible": true
}
This is the node data that is created for edges/links produced by this.getEdge which is passed to the model using diagram.model.addLinkData:
{
"id": "http://semiodesk.com/furniture-ontology/Shelf_http://semiodesk.com/furniture-ontology/isCompatibleTo_http://semiodesk.com/furniture-ontology/Wardrobe",
"uri": "http://semiodesk.com/furniture-ontology/isCompatibleTo",
"isTreeLink": false,
"label": "isCompatibleTo",
"from": "http://semiodesk.com/furniture-ontology/Shelf",
"to": "http://semiodesk.com/furniture-ontology/Wardrobe",
"cardinality": "0..n"
}
I wonder because the edges become visible when both nodes, the from and to node of the relation have isTreeExpanded set to true. So it seems that GoJS is treating the link as a tree link, even if it’s explicitly marked otherwise.
I would expect the link to be visible when both connected nodes are in the model and visible…