예제 #1
0
 /**
  * Function: createRoot
  *
  * Creates a new root cell with a default layer (child 0).
  */
 function createRoot()
 {
     $root = new mxCell();
     $root->insert(new mxCell());
     return $root;
 }
예제 #2
0
 /**
  * Function: createEdge
  * 
  * Creates the edge to be used in <insertEdge>. This implementation does
  * not set the source and target of the edge, these are set when the edge
  * is added to the model.
  */
 function &createEdge($parent, $id = null, $value = null, $source = null, $target = null, $style = null)
 {
     $geometry = new mxGeometry();
     $edge = new mxCell($value, $geometry, $style);
     $edge->setId($id);
     $edge->setEdge(true);
     $edge->geometry->relative = true;
     return $edge;
 }