Jump to content
TNG Community
Sign in to follow this  
Charlie Kent

Fan chart misaligned at 6 & 7 generations

Recommended Posts

Charlie Kent

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

Share this post


Link to post
Share on other sites
bhemph

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×