Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 20 additions & 16 deletions views/cc7/js/CirclesView.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,16 +419,19 @@ export class CirclesView {
const thisCell = thisRow.cells[c + 1];
if (thisCell && thisCell.innerText) {
const thisEntry = thisRow.cells[c + 1].innerText;

PDFs.thisPDFtextArray.push([
thisEntry,
125 + c * 40 + PDFs.thisPDFminX, //+ 140,
5 + r * 20 + whereY,
"helvetica",
"normal",
14,
{ align: "right", maxWidth: 40, fill: "black", strokeColor: "black" },
]);
if (thisEntry.indexOf("True CC7 size ") > -1) {
// do NOT add the message about "True CC7 size may not be accurate"
} else {
PDFs.thisPDFtextArray.push([
thisEntry,
125 + c * 40 + PDFs.thisPDFminX, //+ 140,
5 + r * 20 + whereY,
"helvetica",
"normal",
14,
{ align: "right", maxWidth: 40, fill: "black", strokeColor: "black" },
]);
}
}
}
}
Expand Down Expand Up @@ -715,19 +718,19 @@ export class CirclesView {
});
}
static connectAllToPrimaryPerson(currentRootID) {
condLog("connectAllToPrimaryPerson", { currentRootID });
condLog("window.people.size", window.people.size);
condLog("window.people", window.people);
// console.log("connectAllToPrimaryPerson", { currentRootID });
// console.log("window.people.size", window.people.size);
// console.log("window.people", window.people);
let rootPeep = window.people.get(1.0 * currentRootID);
condLog({ rootPeep });
// console.log({ rootPeep });
if (rootPeep) {
CirclesView.updateFieldsInPersonCodesObject(currentRootID, "A0", "A0-" + currentRootID);
CirclesView.addConnectionsToThisPerson(currentRootID, "A0");
}
}

static updateFieldsInPersonCodesObject(currentID, code, codeLong) {
condLog("updateFieldsInPersonCodesObject:", currentID, code, codeLong);
// console.log("updateFieldsInPersonCodesObject:", currentID, code, codeLong);
let Peep = window.people.get(currentID);
let currentIDstr = "" + currentID;
if (Peep) {
Expand Down Expand Up @@ -810,6 +813,7 @@ export class CirclesView {
}

static addConnectionsToThisPerson(thisID, code, fromWhere = "root", p1 = 0, p2 = 0) {
// console.log("addConnectionsToThisPerson", { thisID }, { code }, { fromWhere }, { p1 }, { p2 });
// thisID = WikiTree ID # for person who we are adding connections for
// fromWhere = the type of connection that prompted this call to expand the network
/*
Expand Down Expand Up @@ -1439,7 +1443,7 @@ export class CirclesView {
let extraRadiusForCentralPerson = 0;

condLog("BEFORE PLACEMENT: dotRadius = " + CirclesView.dotRadius, { radiusMultipler });

// console.log(CirclesView.theLeafCollection, Object.keys(CirclesView.theLeafCollection).length);
let theCentralPersonObject = CirclesView.PersonCodesObject[CirclesView.theLeafCollection["A0"].Id];
let showPhotoChkBox = document.getElementById("displayType_CentralPhoto");
if (
Expand Down
22 changes: 19 additions & 3 deletions views/fanChart/AhnenTafel.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ AhnenTafel.Ahnentafel = class Ahnentafel {

// Stores the next person's WikiTree ID in position corresponding to their Ahnentafel number
// THEN ... if they are a person in thePeopleList collection, check for THEIR parents, and recurse up the tree adding them!
addToAhnenTafel(nextPersonID, ahnNum) {
addToAhnenTafel(nextPersonID, ahnNum, doClimbTree = true, familyType = "") {
this.list[ahnNum] = nextPersonID;
if (this.listByPerson[nextPersonID] && this.listByPerson[nextPersonID].length > 0) {
if (this.listByPerson[nextPersonID].indexOf(ahnNum) > -1) {
Expand All @@ -72,10 +72,26 @@ AhnenTafel.Ahnentafel = class Ahnentafel {
}

let nextPerson = thePeopleList[nextPersonID];
if (nextPerson && nextPerson._data.Father && nextPerson._data.Father > 0) {
if (
doClimbTree &&
familyType == "Bio" &&
nextPerson &&
nextPerson._data.BioFather &&
nextPerson._data.BioFather > 0
) {
this.addToAhnenTafel(nextPerson._data.BioFather, 2 * ahnNum);
} else if (doClimbTree && nextPerson && nextPerson._data.Father && nextPerson._data.Father > 0) {
this.addToAhnenTafel(nextPerson._data.Father, 2 * ahnNum);
}
if (nextPerson && nextPerson._data.Mother && nextPerson._data.Mother > 0) {
if (
doClimbTree &&
familyType == "Bio" &&
nextPerson &&
nextPerson._data.BioMother &&
nextPerson._data.BioMother > 0
) {
this.addToAhnenTafel(nextPerson._data.Mother, 2 * ahnNum + 1);
} else if (doClimbTree && nextPerson && nextPerson._data.Mother && nextPerson._data.Mother > 0) {
this.addToAhnenTafel(nextPerson._data.Mother, 2 * ahnNum + 1);
}
}
Expand Down
12 changes: 12 additions & 0 deletions views/fanChart/FanChartView.js
Original file line number Diff line number Diff line change
Expand Up @@ -1985,6 +1985,9 @@ import { PDFs } from "../shared/PDFs.js";
thisElement = null;
if (thisPhotoDIV) {
thisElement = thisPhotoDIV.children[0];
if (thisElement == null) {
thisElement = thisPhotoDIV;
}
}
// thisElement = document.getElementById(thisID);
if (
Expand All @@ -2003,6 +2006,7 @@ import { PDFs } from "../shared/PDFs.js";
ahnNum: index,
});

// console.log("IF - Adding image to ", thisElement.src, " PDF with base string:", thisBaseString);
PDFs.thisPDFimageArray.push([
thisBaseString,
// "/apps/clarke11007/images/icons/female.gif",
Expand All @@ -2027,6 +2031,12 @@ import { PDFs } from "../shared/PDFs.js";
ahnNum: index,
});

// console.log(
// "ELSE IF - Adding image to ",
// thisElement.src,
// " PDF with base string:",
// thisBaseString
// );
PDFs.thisPDFimageArray.push([
thisBaseString, //thisElement.src,
"PNG",
Expand All @@ -2040,6 +2050,8 @@ import { PDFs } from "../shared/PDFs.js";
]);
thisY += (thisElement.height + 20) * thisYdy;
thisX += (thisElement.height + 20) * thisYdx;
} else {
console.log("NOT Adding image for ", thisElement);
}

let thisHereFontSize = PDFs.currentPDFsettings.thisFontSize; // temporary holding variable for font size when we need to squish in names or places in tight wedges
Expand Down
Loading