<!-- saved from url=(0026)http://www.naturaldocs.org -->
<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxRootChangeCodec"></a>mxRootChangeCodec</h1><divclass=CBody><p>Codec for <ahref="../model/mxGraphModel-js.html#mxRootChange"class=LClassid=link4onMouseOver="ShowTip(event, 'tt1', 'link4')"onMouseOut="HideTip('tt1')">mxRootChange</a>s. This class is created and registered dynamically at load time and used implicitely via <ahref="mxCodec-js.html#mxCodec"class=LClassid=link5onMouseOver="ShowTip(event, 'tt4', 'link5')"onMouseOut="HideTip('tt4')">mxCodec</a> and the <ahref="mxCodecRegistry-js.html#mxCodecRegistry"class=LClassid=link6onMouseOver="ShowTip(event, 'tt5', 'link6')"onMouseOut="HideTip('tt5')">mxCodecRegistry</a>.</p><h4class=CHeading>Transient Fields</h4><ul><li>model</li><li>previous</li><li>root</li></ul><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxRootChangeCodec">mxRootChangeCodec</a></td><tdclass=SDescription>Codec for <ahref="../model/mxGraphModel-js.html#mxRootChange"class=LClassid=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">mxRootChange</a>s. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxRootChangeCodec.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxRootChangeCodec.onEncode">onEncode</a></td><tdclass=SDescription>Encodes the child recursively.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxRootChangeCodec.beforeDecode"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">beforeDecode</a></td><tdclass=SDescription>Decodes the optional children as cells using the respective decoder.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxRootChangeCodec.afterDecode"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">afterDecode</a></td><tdclass=SDescription>Restores the state by assigning the previous value.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRootChangeCodec.onEncode"></a>onEncode</h3><divclass=CBody><p>Encodes the child recursively.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRootChangeCodec.beforeDecode"></a>beforeDecode</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>codec.beforeDecode = function(</td><tdclass="PParameter prettyprint "nowrap>dec,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>node,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>obj</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Decodes the optional children as cells using the respective decoder.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRootChangeCodec.afterDecode"></a>afterDecode</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>codec.afterDecode = function(</td><tdclass="PParameter prettyprint "nowrap>dec,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>node,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>obj</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Restores the state by assigning the previous value.</p></div></div></div>
<divclass=CToolTipid="tt1"><divclass=CClass>Action to change the root in a model.</div></div><divclass=CToolTipid="tt2"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>codec.beforeDecode = function(</td><tdclass="PParameter prettyprint "nowrap>dec,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>node,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>obj</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Decodes the optional children as cells using the respective decoder.</div></div><divclass=CToolTipid="tt3"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>codec.afterDecode = function(</td><tdclass="PParameter prettyprint "nowrap>dec,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>node,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>obj</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Restores the state by assigning the previous value.</div></div><divclass=CToolTipid="tt4"><divclass=CClass>XML codec for JavaScript object graphs. </div></div><divclass=CToolTipid="tt5"><divclass=CClass>Singleton class that acts as a global registry for codecs.</div></div><!--END_ND_TOOLTIPS-->