Skip to content

Commit f554a5d

Browse files
committed
Add relChartDiv as option in buildGraph()
1 parent 048c3de commit f554a5d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

graph/graph.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,19 @@
4242
* @param ignoreUndo - Flag for whether to ignore the undo logic (set to true for undo/redo actions).
4343
* @param imgOverlayToGx - Map of DOM element ID of an image overlay rectangle to the id of the GedcomX element that it goes with. Ignored if null.
4444
* @param isDraggable - Flag for whether the rel chart should be draggable.
45+
* @param relChartDiv - id to put the relationship chart in (default="rel-chart")
4546
* @returns {RelationshipChart}
4647
*/
47-
function buildGraph(gx, isEditable, prevChart, ignoreUndo, imgOverlayToGx = null, isDraggable = false) {
48-
return buildRelGraph(gx, prevChart ? prevRelChartOptions(prevChart, ignoreUndo): new ChartOptions({
48+
function buildGraph(gx, isEditable, prevChart, ignoreUndo, imgOverlayToGx = null, isDraggable = false,
49+
relChartDiv='rel-chart') {
50+
return buildRelGraph(gx, prevChart ? prevRelChartOptions(prevChart, ignoreUndo):
51+
new ChartOptions({
4952
isEditable: isEditable,
5053
prevChart: prevChart,
5154
ignoreUndo: ignoreUndo,
5255
imgOverlayToGx: imgOverlayToGx,
5356
isDraggable: isDraggable
54-
}));
57+
}), relChartDiv);
5558
}
5659

5760
function buildMultipleRelGraphs(gxRecordSet, chartOptions) {

0 commit comments

Comments
 (0)