Jump to content
TNG Community
Sign in to follow this  
XerxX

Fan Chart Text-align Fix

Recommended Posts

XerxX

Hi all,

 

I just upgraded to v11 and found the Fan Chart really nice.

There is, however, in my view a problem in generation 5: There is too much space "above" the text/name:

fan1.png.

I have found how to tweak it (and I also add some space for generation 3) and post it here in "Mod-format":

 

%target:fan.php%
%location:%
//        console.log("placeWrappedText: %s",pText);
%end:%

%insert:before%
        if (gens == 4) originY -= 16; // Modfd: Remove space from gen 5
        if (gens == 2) originY += 8; // Modfd: Add space to gen 3
%end:%

 

The result for generation 5:

fan2.png

I DON'T post this as a Mod in the TNG Wiki because I suppose it will soon be fixed by Darrin. He's notified of this.

(If you think it should be a Wiki Mod: Be my guest to post it!)

 

Regards,

Erik

 

Share this post


Link to post
Share on other sites
tngrlkrz

Hi Erik,

I had to try it out to see the difference in a the complete fan semicircle, since it is a subtle alignment change.  A nice improvement, will add to my 'Misc' mod, but I would think it could wait for Darrin to adjust rather than be in the Wiki, ...but that's just me.

Thanks,

Ron

 

Share this post


Link to post
Share on other sites
XerxX

Hi Ron,

 

The annoying thing for me is that I have many persons that occupy four rows and that's what the sector can hold.

If the alignment isn't proper, they are using the next sector.

 

I'm glad you like it!

Erik

Share this post


Link to post
Share on other sites
bhemph

Erik,
     There are a couple of issues that cause this.  One is that sometimes the code will grab a blank line and use that as one of the lines of text to display, the other is that the centering calculation is off a little bit on some of those higher generations.  I had made note of these as well as an issue with putting an extra generation into the page code that was not displayed and the issue where the bottom pixel of the chart would show a link to someone other than the individual in the chart immediately above the cursor.  I sent these issues and the fixes to Darrin over a year ago, when he was looking for a fix to an issue with Unicode chars that were saved in the database as HTML special characters (like "∀"), which I also had a fix for.  So I'm a little surprised that the version being distributed would still have the problem, although I know he didn't like that my file wasn't on the web for him to see how it worked because I am on my localhost WAMP server.  I haven't upgraded to v11 yet so my file was from the original fan mod as well, which could have made it a little difficult to see the fixed sections of code.

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  

×