3

How can I add custom attribute in mxCell tag of mxgraph? I want to add value2="customValue

<mxGraphModel dx="872" dy="535" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" background="#ffffff">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>

        <mxCell id="2" value="wfState_1" value2="customValue" style="strokeColor:red" vertex="1" parent="1">
          <mxGeometry x="50" y="110" width="120" height="70" as="geometry"/>
        </mxCell>
      </root>
    </mxGraphModel>

// the function is

this.createVertexTemplateEntry('rounded=0;whiteSpace=wrap;html=1;strokeColor=red;shadow=1', 120, 70, 'wfState_2', 'workFllow2', null, null, 'rect rectangle box'),
  • 1
    The mxGraph documentation says to uses an xml as the value attribute. https://jgraph.github.io/mxgraph/docs/js-api/files/model/mxCell-js.html – javaDeveloper Nov 29 '17 at 12:05

0 Answers0