GenoPro Home
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 
Beta15 SVG corrections and improvements


https://support.genopro.com/Topic9172.aspx
Print Topic | Close Window

By genome - Wednesday, November 9, 2005
The attached replacement template file genomap.svg corrects some errors in the Beta15 version. i.e.
  1. Internal hyperlinks do not work, i.e. they redisplay the same map instead of the target map.
  2. All Label text appears in the 1st label only.

This code also adds the following improvements:

  1. Arrow objects now have arrowheads.
  2. All lines are drawn with rounded ends and joins and so look more like the corresponding GenoPro diagram.
  3. Genomaps are now initially scaled and placed such that the whole genomap is visible, provided that the 'boundary_rect' property is present. If it is not then a warning appears in the message log. To correct this, simply visit each such GenoMap and make a dummy update, e.g. select an object, delete it then undo the deletion.
  4. Some redundant code is removed.

N.B. the attachment is named genomap.txt. After it is downlaoded it must be renamed to genomap.svg. Unfortunately this forum does not permit attachments with file extension svg.

I am hoping to introduce scroll bars and zoom in/out buttons in a later version to make navigation more intuitive.

UPdate 14/11/2005 new version of attachment genomap.txt

By GenoProSupport - Wednesday, November 9, 2005
Great work Ron.  I have re-packaged the file InstallGenoProBeta.exe to include the new stuff.  All you need is to re-download the file http://www.genopro.com/beta/InstallGenoProBeta.exe and you will get the new SVG template.

Ron (11/9/2005)
Genomaps are now initially scaled and placed such that the whole genomap is visible, provided that the 'boundary_rect' property is present. If it is not then a warning appears in the message log. To correct this, simply visit each such GenoMap and make a dummy update, e.g. select an object, delete it then undo the deletion.

The earlier betas were not saving the boundary rectangle in the .gno file, so you need to modify each GenoMap at least once to have a valid boundary rectangle.

By V.L.o - Thursday, November 10, 2005
In line with my previous post concerning zooming on the particular person in SVG might be this one too.

So far hyperlink only switches the view among genomaps if persons are in different genomaps, and then only to default genomap view... so if there is internal hyperlink (within genomap) view just jumps to default view of particular genomap...

...and I don't know why (most probably SVG issue) but lines are a bit smudged if not zoomed in really close...

By rdn - Thursday, November 10, 2005
GenoProSupport (11/9/2005)
Great work Ron.  I have re-packaged the file InstallGenoProBeta.exe to include the new stuff.  All you need is to re-download the file http://www.genopro.com/beta/InstallGenoProBeta.exe and you will get the new SVG template.

Ron (11/9/2005)
Genomaps are now initially scaled and placed such that the whole genomap is visible, provided that the 'boundary_rect' property is present. If it is not then a warning appears in the message log. To correct this, simply visit each such GenoMap and make a dummy update, e.g. select an object, delete it then undo the deletion.

The earlier betas were not saving the boundary rectangle in the .gno file, so you need to modify each GenoMap at least once to have a valid boundary rectangle.

Dan, this is not good for me.  The previous version enabled me to see most of my tree at a time, yet enable me to zoom in enough to be able to read the individuals.  Now, with the size of my tree so large, when I zoom in to the maximum allowed, I cannot read the names of the individuals.  Can the number of zooms be increased?  Or perhaps, is there a way to start from a size that will enable under maximum zoom to be able to read the names?  If not, how can I go back to the previous version of the SVG?

By GenoProSupport - Thursday, November 10, 2005
I think a zoom at 100% would be best.  This way, the user could zoom-in and zoom-out if desired.
By genome - Thursday, November 10, 2005
Yes I see your problem with a large tree Danny.

 I am still looking for a way to place the selected individual/family in the centre of the map area.
Meanwhile to revert to previous unscaled display change genomap.svg as follows:

replace the following lines
' if GenoMap bounding box present, transform map to fit window
 If g.boundary_rect <> "" Then ' scale & transform to fit GenoMap into frame.
  coords=split(replace(replace(g.boundary_rect,"(",""),")",""),",")
  strWidth=coords(2) - coords(0)
  strHeight=- coords(3) + coords(1)
  If (1000 / strWidth)  < (400 / strHeight) Then
   strScale = 1000 / strWidth
  Else
   strScale = 400 / strHeight
  End If
  Report.WriteFormattedLn "<g transform=""translate({0},{1})scale({2})"">", - coords(0) * strScale, coords(1) * strScale, strScale
 Else  ' assume GenoMap is 'balanced at the origin' and display without scaling.
  Report.WriteLn  "<g transform=""translate(500, 320)"">"
  Report.LogError "Warning: GenoMap '" & g.name & "' has no boundary rectangle property, perform a dummy update on this GenoMap to correct this."
 End If

with
  Report.WriteLn  "<g transform=""translate(500, 320)"">"

By rdn - Thursday, November 10, 2005
Thank you Ron.  I will use the code you just included.  However, I was hoping for a more global solution that will be appropriate for everyone.  Thanks again for the quick reply.
By genome - Friday, November 11, 2005
I have now made a few more improvements such as correct rendering of the new relationship types and using the same colours for lines and fills as in GenoPro itself.
I have also added a Config.xml parameter to allow either initial 'zoom to extent' to show the whole GenoMap or no initial zoom centred around the orgin for a non-zoomed, i.e. 100%, view.
Modified Config.xml and genomap.txt files are attached.

N.B. You will need to rename genomap.txt to genomap.svg after downloading.

Update: 14/11/2005 new version of attachment genomap.txt

By Howard53 - Friday, November 11, 2005
Ron (11/11/2005)
I have now made a few more improvements such as correct rendering of the new relationship types and using the same colours for lines and fills as in GenoPro itself.

Ron, the full colour version is great. However, the Report is still not picking up a divorce on the last marriage for an individual with multiple marriages (although it says they had no children).


I have also added a Config.xml parameter to allow either initial 'zoom to extent' to show the whole GenoMap or no initial zoom centred around the orgin for a non-zoomed, i.e. 100%, view.

How do you access this - do you have to edit the config.xml file?

By genome - Friday, November 11, 2005

I have also added a Config.xml parameter to allow either initial 'zoom to extent' to show the whole GenoMap or no initial zoom centred around the orgin for a non-zoomed, i.e. 100%, view.

How do you access this - do you have to edit the config.xml file?

Yes, if you download my Config.xml file from above post you will see an additional line

    fZoomSVGtoExtent="Y"
Just change "Y" to "N" to have no initial zoom and centred around the origin.

However, the Report is still not picking up a divorce on the last marriage for an individual with multiple marriages (although it says they had no children).
This thread deals with just the SVG generation. I have not delved into the non-SVG issues in Beta 15 as yet. Maybe Dan has?
By MR - Friday, November 11, 2005
Thanks for the change Ron.

However now all people are marked as dead on SVG...  Seems a bit overdoingSmile

Another question, but really not so important. On my genomap some of the gender symbols are colored (I used all top-left, bottom left etc colors on display tab) - I am using this to mark my direct ancestors for easier visibility. Is this possible on SVG somehow?

By genome - Friday, November 11, 2005
Yes I do seem to have killed off a few people prematurely! Ermm I have updated the genomap.txt file above to ensure I only cross out the dead ones.
You can hide the cross by setting the 'never draw deceased cross' flag under the Individual's Display tab within GenoPro.

And yes I should be able to add the marker blocks in the gender symbol. Watch this space .....

By genome - Monday, November 14, 2005
Another question, but really not so important. On my genomap some of the gender symbols are colored (I used all top-left, bottom left etc colors on display tab) - I am using this to mark my direct ancestors for easier visibility. Is this possible on SVG somehow?

Have now posted new version of genomap.svg (a.k.a genomap.txt) into my earlier posts in this thread that reproduces any coloured quadrants in the gender symbols and also displays 'social entities' and 'social relationships'. This was perhaps the most demanding bit of coding with some algebra needed to determine line intersections which put my head in spin for a while!
There is also an improvement in the flow of text within labels & Social entities to make it look more like GenoPro. You need Adobe SVG Viewer Beta 6 to see this.
Also fixed bug caused by GenoPro sometimes placing an @ symbol in front of Global.Font property causing a default font to be selected and non-Latin characters not to be displayed (e.g. Japanese).
The social entity/relationship line pattern rendering is perhaps not exactly the same as GenoPro yet and at present the arrowheads are always black. C'est la vie!

By GenoProSupport - Monday, November 14, 2005
I have been working on many improvements for the report generator.  Of course, those changes will be in Beta15b.
  1. The boundary_rect now returns a rectangle as an object, which makes it easier to manipulate and format.  I also fixed the problem where the boundary_rect is empty for the individual.
  2. The positions x,y are returned without the parentheses (), making them simpler to parse.
  3. It is possible to get the text of a label as displayed in the family tree.  A simple For loop does the trick to iterate for each display line.  Also, the dimension (width and height) of the text can be returned.
  4. I plan to eventually have GenoPro return an array of points representing the drawing of the emotional relationships.  This way, there will be no need to compute anything... just connect the dots.
By MR - Tuesday, November 15, 2005
It is perfect!!! Thanks Ron, appreciate your mathematical abilities...