summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Controller/PedigreeController.php9
-rw-r--r--pedigree.php14
2 files changed, 8 insertions, 15 deletions
diff --git a/app/Controller/PedigreeController.php b/app/Controller/PedigreeController.php
index 432c321e3e..81b1b8aae2 100644
--- a/app/Controller/PedigreeController.php
+++ b/app/Controller/PedigreeController.php
@@ -41,16 +41,9 @@ class PedigreeController extends ChartController {
* Create a pedigree controller
*/
public function __construct() {
- global $WT_TREE;
- global $bwidth, $bheight, $baseyoffset, $basexoffset, $byspacing, $bxspacing, $show_full, $talloffset;
+ global $WT_TREE, $bwidth, $bheight, $baseyoffset, $basexoffset, $byspacing, $bxspacing, $show_full, $talloffset;
parent::__construct();
- $this->linewidth = Theme::theme()->parameter('line-width');
- $this->shadowcolor = Theme::theme()->parameter('shadow-color');
- $this->shadowblur = Theme::theme()->parameter('shadow-blur');
- $this->shadowoffsetX = Theme::theme()->parameter('shadow-offset-x');
- $this->shadowoffsetY = Theme::theme()->parameter('shadow-offset-y');
-
$this->show_full = Filter::getInteger('show_full', 0, 1, $WT_TREE->getPreference('PEDIGREE_FULL_DETAILS'));
$this->talloffset = Filter::getInteger('talloffset', 0, 3, $WT_TREE->getPreference('PEDIGREE_LAYOUT'));
$this->box_width = Filter::getInteger('box_width', 50, 300, 100);
diff --git a/pedigree.php b/pedigree.php
index df3579414c..1567b141ac 100644
--- a/pedigree.php
+++ b/pedigree.php
@@ -267,10 +267,10 @@ $controller->addInlineJavascript('
talloffset = ' . $talloffset . ',
canvaswidth = ' . ($canvaswidth) . ',
offset_x = 20,
- offset_y = ' . $controller->pbheight . '/2+' . $controller->linewidth . ',
+ offset_y = ' . $controller->pbheight . '/2+' . Theme::theme()->parameter('line-width') . ',
lineDrawx = new Array("' . join(array_reverse($lineDrawx), '","') . '"),
lineDrawy = new Array("' . join(array_reverse($lineDrawy), '","') . '"),
- offset_x2 = ' . $controller->pbwidth . '/2+' . $controller->linewidth . ',
+ offset_x2 = ' . $controller->pbwidth . '/2+' . Theme::theme()->parameter('line-width') . ',
offset_y2 = ' . $controller->pbheight . '*2,
lineDrawx2 = new Array("' . join($lineDrawx, '","') . '"),
lineDrawy2 = new Array("' . join($lineDrawy, '","') . '"),
@@ -279,11 +279,11 @@ $controller->addInlineJavascript('
// Set line styles
ctx.strokeStyle = jQuery("#pedigree_canvas").css("color");
- ctx.lineWidth = ' . $controller->linewidth . ';
- ctx.shadowColor = "' . $controller->shadowcolor . '";
- ctx.shadowBlur = ' . $controller->shadowblur . ';
- ctx.shadowOffsetX = ' . $controller->shadowoffsetX . ';
- ctx.shadowOffsetY = ' . $controller->shadowoffsetY . ';
+ ctx.lineWidth = ' . Theme::theme()->parameter('line-width') . ';
+ ctx.shadowColor = "' . Theme::theme()->parameter('shadow-color') . '";
+ ctx.shadowBlur = ' . Theme::theme()->parameter('shadow-blur') . ';
+ ctx.shadowOffsetX = ' . Theme::theme()->parameter('shadow-offset-x') . ';
+ ctx.shadowOffsetY = ' . Theme::theme()->parameter('shadow-offset-y') . ';
//Draw the lines
switch (talloffset) {