<!-- saved from url=(0026)http://www.naturaldocs.org -->
<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxImageBundle"></a>mxImageBundle</h1><divclass=CBody><p>Maps from keys to base64 encoded images or file locations. All values must be URLs or use the format data:image/format followed by a comma and the base64 encoded image data, eg. “data:image/gif,XYZ”, where XYZ is the base64 encoded image data.</p><h4class=CHeading>To add a new image bundle to an existing graph, the following code is used</h4><blockquote><preclass="prettyprint">var bundle = new mxImageBundle(alt);
Alt is an optional boolean (default is false) that specifies if the value
or the fallback should be returned in <getImage>.
The image can then be referenced in any cell style using image=myImage.
If you are using mxOutline, you should use the same image bundles in the
graph that renders the outline.
The keys for images are resolved in <mxGraph.postProcessCellStyle> and
turned into a data URI if the returned value has a short data URI format
as specified above.
A typical value for the fallback is a MTHML link as defined in RFC 2557.
Note that this format requires a file to be dynamically created on the
server-side, or the page that contains the graph to be modified to contain
the resources, this can be done by adding a comment that contains the
resource in the HEAD section of the page after the title tag.
This type of fallback mechanism should be used in IE6 and IE7. IE8 does
support data URIs, but the maximum size is limited to 32 KB, which means
all data URIs should be limited to 32 KB.</pre></blockquote><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxImageBundle">mxImageBundle</a></td><tdclass=SDescription>Maps from keys to base64 encoded images or file locations. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxImageBundle.Variables">Variables</a></td><tdclass=SDescription></td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxImageBundle.images"id=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">images</a></td><tdclass=SDescription>Maps from keys to images.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxImageBundle.alt">alt</a></td><tdclass=SDescription>Specifies if the fallback representation should be returned.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxImageBundle.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxImageBundle.putImage"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">putImage</a></td><tdclass=SDescription>Adds the specified entry to the map. </td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxImageBundle.getImage"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">getImage</a></td><tdclass=SDescription>Returns the value for the given key. </td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxImageBundle.images"></a>images</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxImageBundle.prototype.images</td></tr></table></blockquote><p>Maps from keys to images.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxImageBundle.alt"></a>alt</h3><divclass=CBody><p>Specifies if the fallback representation should be returned.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxImageBundle.putImage"></a>putImage</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxImageBundle.prototype.putImage = function(</td><tdclass=PParameternowrap>key,</td></tr><tr><td></td><tdclass=PParameternowrap>value,</td></tr><tr><td></td><tdclass=PParameternowrap>fallback</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds the specified entry to the map. The entry is an object with a value and fallback property as specified in the arguments.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxImageBundle.getImage"></a>getImage</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxImageBundle.prototype.getImage = function(</td><tdclass=PParameternowrap>key</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the value for the given key. This returns the value or fallback, depending on <ahref="#mxImageBundle.alt"class=LVariableid=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">alt</a>. The fallback is returned if <ahref="#mxImageBundle.alt"class=LVariableid=link5onMouseOver="ShowTip(event, 'tt4', 'link5')"onMouseOut="HideTip('tt4')">alt</a> is true, the value is returned otherwise.</p></div></div></div>
</div><!--Content-->
<divid=Footer><ahref="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
<divclass=CToolTipid="tt1"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxImageBundle.prototype.images</td></tr></table></blockquote>Maps from keys to images.</div></div><divclass=CToolTipid="tt2"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxImageBundle.prototype.putImage = function(</td><tdclass=PParameternowrap>key,</td></tr><tr><td></td><tdclass=PParameternowrap>value,</td></tr><tr><td></td><tdclass=PParameternowrap>fallback</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Adds the specified entry to the map. </div></div><divclass=CToolTipid="tt3"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxImageBundle.prototype.getImage = function(</td><tdclass=PParameternowrap>key</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Returns the value for the given key. </div></div><divclass=CToolTipid="tt4"><divclass=CVariable>Specifies if the fallback representation should be returned.</div></div><!--END_ND_TOOLTIPS-->