| /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| * Copyright (c) 2013, Regents of the University of California |
| * BSD license, See the LICENSE file for more information |
| * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu> |
| * Alexander Afanasyev <alexander.afanasyev@ucla.edu> |
| OneLevelTreeLayout::setOneLevelLayout(std::vector<Coordinate> &childNodesCo) |
| if (childNodesCo.empty()) |
| double y = getLevelDistance(); |
| double sd = getSiblingDistance(); |
| int n = childNodesCo.size(); |
| double x = - (n - 1) * sd / 2; |
| for (int i = 0; i < n; i++) |