Jump to content
TNG Community

Fan chart misaligned at 6 & 7 generations


Charlie Kent

Recommended Posts

Does anyone else have an issue with fan charts where the 6th an 7th generations are misaligned with the lines of the fan chart in the light green section?    It seems to affect just that section of the chart.    If the description doesnt make sense, I've attached a screenshot to demo what I'm talking about.   Is there anything I can do to correct this?

TNG fan chart.JPG

Link to comment
Share on other sites

Charlie,
      In TNG 12, the code that did the name logic in figuring out how many lines are in a name was:

		numDisplayLines=0;
		for (var a=1; a <= parts.length; a++)
		{
			if(ctx.measureText(parts.slice(start,a).join(' ')).width < w)
			{
				continue;
			}
			if(parts.slice(start,a-1).join(' ') == '')
			{
				continue;
			}
			start=a-1;
			numDisplayLines=numDisplayLines+1;
		}

In TNG 13.0.4, that was changed to:

		numDisplayLines=0;
		var newparts = new Array(parts[0]);
		for (var a=1; a <= parts.length; a++)
		{
			if(parts.length < 5 || a == 1 || a == parts.length) {
				if(parts.slice(start,a-1).join(' ') == '')
				{
					continue;
				}
				start=a-1;
				numDisplayLines=numDisplayLines+1;
				newparts.push(parts[start]);
			}
		}
		parts = newparts;


I have personally made a mod to revert to the old logic, since that does align properly.  The old logic also show full names for names like "Carel Louie Van Den Berghe" while the TNG 13 logic (it has been changing in nearly each version of 13 just a little bit) displays his name in the tree as "Carel Berghe" which is only his first name and the last piece of his 3 part surname.  I see that you seem to have the same missing part of surname issue with your Andries DE KLERK, father of Jan Jacobus DE KLERK in your screenshot.

Brent

Link to comment
Share on other sites

  • 4 months later...

Since the Fan Chart was a mod that was incorporated into TNG, I would think that this problem would be sent to Darrin to fix the TNG code and that Brent's mod would be provided as a Fix mod only until Darrin fixes the code 

Link to comment
Share on other sites

The fan chart misalignment must not effect everyone, since I am not seeing it on my TNG 13.1.1 site.

image.png

Link to comment
Share on other sites

7 hours ago, tngrlkrz said:

The fan chart misalignment must not effect everyone, since I am not seeing it on my TNG 13.1.1 site.

image.png

Yours is like mine Ron - it is tending towards showing the problem in that the last row out - in my case the 8th generation, the names aren't centred in the boxes like they are in the earlier generations - from http://lisaandroger.com/genealogy/fan.php?personID=I2&amp;tree=Roger&amp;parentset=0&amp;generations=8 

image.png

 

Roger

Link to comment
Share on other sites

18 hours ago, Ken Roy said:

Since the Fan Chart was a mod that was incorporated into TNG, I would think that this problem would be sent to Darrin to fix the TNG code and that Brent's mod would be provided as a Fix mod only until Darrin fixes the code 

Is Brent's fix mod available? I'm not finding it on the mod list.

Also I'm comfortable making the edit described above I'm just not sure which file to edit.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...