PeWu / topola-viewer

Topola Genealogy Viewer – interactive genealogy visualization
https://pewu.github.io/topola-viewer
Apache License 2.0
196 stars 49 forks source link

Tree geometry is too sensitive to long strings #34

Open refob opened 3 years ago

refob commented 3 years ago

My gedcom files contain large locations strings which produce huge node boxes like this: location

It would help to shorten long strings for nodes and show the full string only in the right detail window.

PeWu commented 3 years ago

I agree it would be nice to make the boxes smaller. Do you have a suggestion how to shorten the long strings?

endolith commented 3 years ago

For United States locations, shorten to just the state abbreviation

In fact, I can imagine it dynamically showing more or less information as you zoom in and out horizontally, to make the tree wider or narrower, with rules defined that increasingly shorten the text so that it is still maximally useful:

The totally unrelated https://sigrok.org/wiki/PulseView application has this function, where you can zoom in to a decoded signal and it will show different abbreviations of the content depending on zoom level and what fits:

image

image

image

image

with the shortening rules defined like:

c1 = 'Left channel' if not self.oldws else 'Right channel'
c2 = 'Left' if not self.oldws else 'Right'
c3 = 'L' if not self.oldws else 'R'