Constraints

Tasks

add nodes A-E make node C a rectangle make node B a triangle add a directed edge from node A to node C and node B to node C add a constraint that node C's horizontal coordinate is midway between node A's and node B's

JSON Representation

{
"directed": false,
"hasParents": false,
"nodes": {
  "A": {},
  "B": {
    "nodeShape": "triangle"
  },
  "C": {
    "nodeShape": "rectangle"
  },
  "D": {},
  "E": {}
},
"edges": {
  "AC": {
    "source": "A",
    "target": "C"
  },
  "BC": {
    "source": "B",
    "target": "C"
  }
},
"constraints": [
  {
    "meaning": "Node C is at the midpoint of nodes A and B",
    "constraints": [
      "'C'.x  =  ('A'.x + 'B'.x) / 2",
      "'C'.y  =  ('A'.y + 'B'.y) / 2"
    ]
  }
],
"_positions": {
  "A": [
    -4.498779783982723,
    -2.507252767843197
  ],
  "B": [
    4.62481845584044,
    -2.2642067244904767
  ],
  "C": [
    0.06301933592887465,
    -2.3857297461668545
  ],
  "D": [
    -2.8893899617377046,
    3.50386016957706
  ],
  "E": [
    2.700206182787549,
    3.6533114353042984
  ]
}
}