diff --git a/app/Person.php b/app/Person.php index 472bdec..15cfe13 100644 --- a/app/Person.php +++ b/app/Person.php @@ -83,7 +83,7 @@ public function addPersonLabel(string $pid, string $out, SharedNoteList $sharedn default: $border_colour = $this->dot->settings["border_col"]; } - $out .= ""; + $out .= ""; $out .= $this->printPersonLabel($pid, $sharednotes, $related); $out .= ""; return $out; @@ -300,8 +300,10 @@ function printPersonLabel(string $pid, SharedNoteList $sharednotes, bool $relate // Draw table if ($this->dot->settings["diagram_type"] == "combined") { $out .= ""; + $rounded = false; } else { - $style = ($this->shouldBeRounded($i, $this->dot->settings['indi_tile_shape']) ? 'STYLE="ROUNDED" ' : ''); + $rounded = $this->shouldBeRounded($i, $this->dot->settings['indi_tile_shape']); + $style = ($rounded ? 'STYLE="ROUNDED" ' : ''); $out .= "
"; } $birthData = " $birthdate " . (empty($birthplace) ? "" : "($birthplace)"); @@ -331,11 +333,19 @@ function printPersonLabel(string $pid, SharedNoteList $sharednotes, bool $relate $stripe_colour = ''; } if ($stripe_colour !== '') { - $out .= ""; + if ($rounded) { + $out .= ""; + } else { + $out .= ""; + } } // Second row (photo, name, birth, death & burial data) if ($detailsExist || $this->dot->isPhotoRequired()) { $out .= ""; + if ($rounded || $pid == "I_N") { + $out .= ""; + } + // Show photo $out .= $this->getFactImage($pid, $detailsExist, "pic"); if ($detailsExist) { @@ -381,7 +391,10 @@ function printPersonLabel(string $pid, SharedNoteList $sharednotes, bool $relate $out .= $this->getFactImage($pid, $detailsExist, "pic_birth_first"); $out .= $this->getFactImage($pid, $detailsExist, "pic_death_first"); $out .= $this->getFactImage($pid, $detailsExist, "pic_burial_first"); - $out .= ""; + if ($rounded) { + $out .= ""; + } + $out .= ""; } // Close table $out .= "
"; @@ -393,12 +406,12 @@ function printPersonLabel(string $pid, SharedNoteList $sharednotes, bool $relate public function getFactImage(string $pid, bool $detailsExist, string $id) : string { $out = ""; // Show photo - if (($detailsExist) && ($this->dot->isPhotoRequired())) { + if (($detailsExist || $pid == "I_N") && ($this->dot->isPhotoRequired())) { if (isset($this->dot->individuals[$pid][$id]) && !empty($this->dot->individuals[$pid][$id])) { $photo_size = floatval($this->dot->settings["photo_size"]) / 100; $padding = $this->getPhotoPaddingSize(); if ($this->dot->settings["add_links"]) { - $out .= "dot->settings["font_size"] * 4 * $photo_size) . "\" HEIGHT=\"" . ($this->dot->settings["font_size"] * 4 * $photo_size) . "\" FIXEDSIZE=\"true\" ALIGN=\"CENTER\" VALIGN=\"MIDDLE\"" . ($id != 'pic' ? " HREF=\"".$this->dot->convertToHTMLSC( $this->dot->individuals[$pid][$id . "_link"])."\"" : '') . ">dot->individuals[$pid][$id] . "\" ALT=\"" . $this->dot->individuals[$pid][$id . "_title"] . "\" />"; + $out .= "dot->settings["font_size"] * 4 * $photo_size) . "\" HEIGHT=\"" . ($this->dot->settings["font_size"] * 4 * $photo_size) . "\" FIXEDSIZE=\"true\" ALIGN=\"CENTER\" VALIGN=\"MIDDLE\"" . ($id != 'pic' ? " HREF=\"".$this->dot->convertToHTMLSC( $this->dot->individuals[$pid][$id . "_link"])."\"" : '') . ">dot->individuals[$pid][$id] . "\" ALT=\"" . $this->dot->individuals[$pid][$id . "_title"] . "\" />"; } else { $out .= "dot->settings["font_size"] * 4 * $photo_size) . "\" HEIGHT=\"" . ($this->dot->settings["font_size"] * 4 * $photo_size) . "\" FIXEDSIZE=\"true\" ALIGN=\"CENTER\" VALIGN=\"MIDDLE\">dot->individuals[$pid][$id] . "\" ALT=\"" . $this->dot->individuals[$pid][$id . "_title"] . "\" />"; } @@ -601,7 +614,7 @@ private function shouldBeRounded(Individual $i, int $option): bool case 0: default; return false; - case 10: + case Person::TILE_SHAPE_ROUNDED: return true; case Person::TILE_SHAPE_SEX: switch ($i->sex()) {