layoutEdge method

void layoutEdge(
  1. Constraints constraints,
  2. GraphViewOrientation orientation,
  3. List<Offset> path
)

Implementation

void layoutEdge(Constraints constraints, GraphViewOrientation orientation,
    List<Offset> path) {
  if (path.length > 1) {
    final temp = Path();
    Offset last = path.first;
    temp.moveTo(last.dx, last.dy);
    for (final offset in path.skip(1)) {
      if (orientation == GraphViewOrientation.vertical) {
        temp.vertialCubicLineTo(last, offset);
      } else {
        temp.horizontalCubicLineTo(last, offset);
      }
      last = offset;
    }
    linePath = temp;
  } else {
    linePath = Path();
  }
  bounds = linePath.getBounds();
  layout(constraints);
}