codec.decode = function( | dec, | | node, | | into | ) |
|
Reads a sequence of the following child nodes and attributes:
Child Nodes
Attributes
as | Name of the style. |
extend | Name of the style to inherit from. |
Each node contains another sequence of add and remove nodes with the following attributes:
as | Name of the style (see mxConstants). |
value | Value for the style. |
Instead of the value-attribute, one can put Javascript expressions into the node as follows: <add as=”perimeter”>mxPerimeter.RectanglePerimeter</add>
A remove node will remove the entry with the name given in the as-attribute from the style.
Example
<mxStylesheet as="stylesheet">
<add as="text">
<add as="fontSize" value="12"/>
</add>
<add as="defaultVertex" extend="text">
<add as="shape" value="rectangle"/>
</add>
</mxStylesheet>