diff options
| author | Greg Roach <fisharebest@gmail.com> | 2014-10-25 18:35:11 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2014-10-25 18:35:11 +0100 |
| commit | 1992da2093ce724fa8240c283f5745f70654ab05 (patch) | |
| tree | f49ba31c955db0358a885d65f31ed0eafb1edbfe /library/WT/Controller/Pedigree.php | |
| parent | 34fa4ae635baa7a91eebdff116bb822c54ae53e5 (diff) | |
| download | webtrees-1992da2093ce724fa8240c283f5745f70654ab05.tar.gz webtrees-1992da2093ce724fa8240c283f5745f70654ab05.tar.bz2 webtrees-1992da2093ce724fa8240c283f5745f70654ab05.zip | |
Move chart function to chart controller. Use objects instead of XREFs
Diffstat (limited to 'library/WT/Controller/Pedigree.php')
| -rw-r--r-- | library/WT/Controller/Pedigree.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/WT/Controller/Pedigree.php b/library/WT/Controller/Pedigree.php index 5837811e1d..907c5b7394 100644 --- a/library/WT/Controller/Pedigree.php +++ b/library/WT/Controller/Pedigree.php @@ -30,7 +30,7 @@ class WT_Controller_Pedigree extends WT_Controller_Chart { var $PEDIGREE_GENERATIONS; var $pbwidth; var $pbheight; - var $treeid; + var $ancestors; var $treesize; var $curgen; var $yoffset; @@ -101,12 +101,12 @@ class WT_Controller_Pedigree extends WT_Controller_Chart { $this->pbwidth = $bwidth+6; $this->pbheight = $bheight+5; - $this->treeid = ancestry_array($this->rootid, $PEDIGREE_GENERATIONS); + $this->ancestors = $this->sosaAncestors($PEDIGREE_GENERATIONS); $this->treesize = pow(2, (int)($this->PEDIGREE_GENERATIONS))-1; - //-- ancestry_array puts everyone at $i+1 + // sosaAncestors() puts everyone at $i+1 for ($i=0; $i<$this->treesize; $i++) { - $this->treeid[$i] = $this->treeid[$i+1]; + $this->ancestors[$i] = $this->ancestors[$i+1]; } if (!$this->show_full) { @@ -220,7 +220,7 @@ class WT_Controller_Pedigree extends WT_Controller_Chart { //-- calculate the smallest yoffset and adjust the tree to that offset $minyoffset = 0; - for ($i=0; $i<count($this->treeid); $i++) { + for ($i=0; $i<count($this->ancestors); $i++) { if (!empty($offsetarray[$i])) { if (($minyoffset==0)||($minyoffset>$this->offsetarray[$i]["y"])) $minyoffset = $this->offsetarray[$i]["y"]; } |
