From 56a60e5eb4a216cccbf7ed7e9bdfa04250367f86 Mon Sep 17 00:00:00 2001
From: geostag <50096315+geostag@users.noreply.github.com>
Date: Sun, 10 Nov 2024 09:15:03 +0100
Subject: [PATCH] RelationshipChart: make maxImages configurable (#524)
---
src/components/GrampsjsRelationshipChart.js | 2 ++
src/views/GrampsjsViewRelationshipChart.js | 2 ++
src/views/GrampsjsViewTreeChartBase.js | 30 +++++++++++++++++++--
3 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/src/components/GrampsjsRelationshipChart.js b/src/components/GrampsjsRelationshipChart.js
index 0d39b500..9cc6303a 100644
--- a/src/components/GrampsjsRelationshipChart.js
+++ b/src/components/GrampsjsRelationshipChart.js
@@ -35,6 +35,7 @@ class GrampsjsRelationshipChart extends GrampsjsChartBase {
return {
grampsId: {type: String},
nAnc: {type: Number},
+ nMaxImages: {type: Number},
gapX: {type: Number},
}
}
@@ -56,6 +57,7 @@ class GrampsjsRelationshipChart extends GrampsjsChartBase {
return html`
${RelationshipChart(this.data, {
nAnc: this.nAnc,
+ maxImages: this.nMaxImages,
grampsId: this.grampsId,
getImageUrl: d => getImageUrl(d?.data || {}, 200),
gapX: this.gapX,
diff --git a/src/views/GrampsjsViewRelationshipChart.js b/src/views/GrampsjsViewRelationshipChart.js
index 09aac5e3..f266bdd4 100644
--- a/src/views/GrampsjsViewRelationshipChart.js
+++ b/src/views/GrampsjsViewRelationshipChart.js
@@ -19,6 +19,7 @@ export class GrampsjsViewRelationshipChart extends GrampsjsViewTreeChartBase {
super()
this.nAnc = 2
this._setSep = true
+ this._setMaxImages = true
this.color = ''
}
@@ -43,6 +44,7 @@ export class GrampsjsViewRelationshipChart extends GrampsjsViewTreeChartBase {