Main (#1) - Navigate: links (arrows) don't show (#101) - Message List

Navigate: links (arrows) don't show
 unsolved

First I thought that something was wrong with my installation, but then I opened the demo (which is 2.1 dev0) and it was the same there.

Am I missing something in my browser? I have tried latest Firefox / Chrome / Edge.

I run version 2.0.1 on an Ubuntu LTS 16.04.

/Per

Tree View Flat View (newer first) Flat View (older first)
  • Message #272

    I think I actually solved this :-)

    It seems like pygraphviz (1.3.1) generates an extra object level when generating the svg for the arrows. Or maybe it is the xml.etree.cElementTree (python-2.7) that does it. Anyway, the remedy was to add another loop level in "navigate.py:_parse_svg() (see diff below).

    diff --git a/django/openPLM/plmapp/navigate.py b/django/openPLM/plmapp/navigate.py
    index 1a64485..39b5388 100644
    --- a/django/openPLM/plmapp/navigate.py
    +++ b/django/openPLM/plmapp/navigate.py
    @@ -631,11 +631,12 @@ class NavigationGraph(object):
                 if grp.get("class") != "edge":
                     continue
                 e = {"id" : grp.get("id")}
    -            for path in grp.findall("./{http://www.w3.org/2000/svg}a/{http://www.w3.org/2000/svg}path"):
    -                e["p"] = path.get("d")
    +            for g in grp:
    +                for path in g.findall("./{http://www.w3.org/2000/svg}a/{http://www.w3.org/2000/svg}path"):
    +                    e["p"] = path.get("d")
    -            for poly in grp.findall("./{http://www.w3.org/2000/svg}a/{http://www.w3.org/2000/svg}polygon"):
    -                e["a"] = poly.get("points")
    +                for poly in g.findall("./{http://www.w3.org/2000/svg}a/{http://www.w3.org/2000/svg}polygon"):
    +                    e["a"] = poly.get("points")
                 edges.append(e)
             return dict(width=width, height=height, scale=scale, translate=translate,
                     edges=edges)
    
Tree View Flat View (newer first) Flat View (older first)

Attachments