Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Categories

How are embedded images "resources" linked to corresponding nodes?

0 votes
I'm confused as to how the GraphML file links an image resource to a node.

Can someone please explain this to me?

Kind regards, Marc
in Help by (120 points)

1 Answer

0 votes

There is an iconData attribute of the NodeLabel element. This references a resource to use. E.g.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:java="http://www.yworks.com/xml/yfiles-common/1.0/java" xmlns:sys="http://www.yworks.com/xml/yfiles-common/markup/primitives/2.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xmlns:yed="http://www.yworks.com/xml/yed/3" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd">
  <!--Created by yEd 3.20.1-->
  ...
  <key for="graphml" id="d7" yfiles.type="resources"/>
  ...
  <graph edgedefault="directed" id="G">
    <node id="n0">
      <data key="d6">
        <y:ShapeNode>
          ...
          <y:NodeLabel ... iconData="1" ...>
            ...
          </y:NodeLabel>
          ...
        </y:ShapeNode>
      </data>
    </node>
    ...
  </graph>
  <data key="d7">
    <y:Resources>
      <y:Resource id="1">
        <yed:NodeRealizerIcon>
          <y:ShapeNode>
            ...
          </y:ShapeNode>
        </yed:NodeRealizerIcon>
      </y:Resource>
      ...
    </y:Resources>
  </data>
</graphml>
by
Legal Disclosure | Privacy Policy
...