Skip to content

Commit

Permalink
Adjust adding "spouse" class to prevent SVG export failures
Browse files Browse the repository at this point in the history
  • Loading branch information
magicsunday committed Apr 19, 2024
1 parent 21dba96 commit aa21c4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions resources/css/svg.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
fill: var(--sex-u-bg, rgb(255, 255, 255));
}

.webtrees-descendants-chart-container svg .spouse rect.male,
.webtrees-descendants-chart-container svg .spouse rect.female,
.webtrees-descendants-chart-container svg .spouse rect.unknown {
.webtrees-descendants-chart-container svg rect.male.spouse,
.webtrees-descendants-chart-container svg rect.female.spouse,
.webtrees-descendants-chart-container svg rect.unknown.spouse {
stroke-dasharray: 5;
stroke-width: 1px;
}
Expand Down
3 changes: 2 additions & 1 deletion resources/js/modules/lib/tree/node-drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default class NodeDrawer
enter
.append("g")
.attr("opacity", 0)
.attr("class", person => "person" + (person.data.spouse ? " spouse" : ""))
.attr("class", "person")
.attr("transform", (person) => {
return "translate(" + (person.x) + "," + (person.y) + ")";
// TODO Enable this to zoom from source to person
Expand All @@ -115,6 +115,7 @@ export default class NodeDrawer
? "female"
: (person.data.data.sex === SEX_MALE) ? "male" : "unknown"
)
.classed("spouse", person => person.data.spouse)
.attr("rx", 20)
.attr("ry", 20)
.attr("x", -(this._orientation.boxWidth / 2))
Expand Down

0 comments on commit aa21c4b

Please sign in to comment.