diff options
Diffstat (limited to 'library')
| -rw-r--r-- | library/WT/Controller/Ancestry.php | 13 | ||||
| -rw-r--r-- | library/WT/Controller/Descendancy.php | 21 | ||||
| -rw-r--r-- | library/WT/Controller/Hourglass.php | 20 |
3 files changed, 32 insertions, 22 deletions
diff --git a/library/WT/Controller/Ancestry.php b/library/WT/Controller/Ancestry.php index f3cbae1335..df8879bb13 100644 --- a/library/WT/Controller/Ancestry.php +++ b/library/WT/Controller/Ancestry.php @@ -65,15 +65,16 @@ class WT_Controller_Ancestry extends WT_Controller_Chart { // Validate form parameters $this->rootid = check_rootid($this->rootid); - // -- size of the boxes - $Dbwidth*=$box_width/100; + // -- size of the detailed boxes based upon optional width parameter + $Dbwidth=($box_width*$bwidth)/100; + $Dbheight=($box_width*$bheight)/100; $bwidth=$Dbwidth; - if (!$this->show_full) { - $bwidth = $bwidth / 1.5; - } $bheight=$Dbheight; + + // -- adjust size of the non-detailed boxes if (!$this->show_full) { - $bheight = $bheight / 1.5; + $bwidth = $bwidth / 1.5; + $bheight = $bheight / 2 ; } $pbwidth = $bwidth+12; diff --git a/library/WT/Controller/Descendancy.php b/library/WT/Controller/Descendancy.php index 827092c23b..c5d9f15708 100644 --- a/library/WT/Controller/Descendancy.php +++ b/library/WT/Controller/Descendancy.php @@ -66,24 +66,25 @@ class WT_Controller_Descendancy extends WT_Controller_Chart { $this->chart_style=safe_GET_integer('chart_style', 0, 3, 0); $this->generations=safe_GET_integer('generations', 2, $MAX_DESCENDANCY_GENERATIONS, $DEFAULT_PEDIGREE_GENERATIONS); $this->box_width =safe_GET_integer('box_width', 50, 300, 100); + $box_width =safe_GET_integer('box_width', 50, 300, 100); // This is passed as a global. A parameter would be better... $show_full=$this->show_full; if (!isset($this->personcount)) $this->personcount = 1; - $this->Dbwidth*=$this->box_width/100; - - if (!$this->show_full) { - $bwidth *= $this->box_width / 150; - } else { - $bwidth*=$this->box_width/100; - } - + // -- size of the detailed boxes based upon optional width parameter + $Dbwidth=($box_width*$bwidth)/100; + $Dbheight=($box_width*$bheight)/100; + $bwidth=$Dbwidth; + $bheight=$Dbheight; + + // -- adjust size of the non-detailed boxes if (!$this->show_full) { - $bheight = $bheight / 1.5; + $bwidth = $bwidth / 1.5; + $bheight = $bheight / 2 ; } - + $pbwidth = $bwidth+12; $pbheight = $bheight+14; diff --git a/library/WT/Controller/Hourglass.php b/library/WT/Controller/Hourglass.php index b2920550b0..2ba3c5dddb 100644 --- a/library/WT/Controller/Hourglass.php +++ b/library/WT/Controller/Hourglass.php @@ -73,6 +73,7 @@ class WT_Controller_Hourglass extends WT_Controller_Chart { $this->show_spouse=safe_GET('show_spouse', array('0', '1'), '0'); $this->generations=safe_GET_integer('generations', 2, $MAX_DESCENDANCY_GENERATIONS, 3); $this->box_width =safe_GET_integer('box_width', 50, 300, 100); + $box_width =safe_GET_integer('box_width', 50, 300, 100); // This is passed as a global. A parameter would be better... $show_full=$this->show_full; @@ -91,14 +92,21 @@ class WT_Controller_Hourglass extends WT_Controller_Chart { $this->arrwidth = $temp[0]; $this->arrheight= $temp[1]; } + + // -- size of the detailed boxes based upon optional width parameter + $Dbwidth=($box_width*$bwidth)/100; + $Dbheight=($box_width*$bheight)/100; + $bwidth=$Dbwidth; + $bheight=$Dbheight; + + // -- adjust size of the non-detailed boxes + if (!$this->show_full) { + $bwidth = $bwidth / 1.5; + $bheight = $bheight / 2 ; + } - // -- Sets the sizes of the boxes - if (!$this->show_full) $bwidth *= $this->box_width / 150; - else $bwidth*=$this->box_width/100; - - if (!$this->show_full) $bheight = (int)($bheight / 2); $bhalfheight = (int)($bheight / 2); - + // Validate parameters $this->pid=check_rootid($this->pid); |
