Codec for mxCells. This class is created and registered dynamically at load time and used implicitly via mxCodec and the mxCodecRegistry.
mxCodecRegistry.getCodec(mxCell).exclude.push(‘name_of_field’);
To subclass mxCell, replace the template and add an alias as follows.
function CustomCell(value, geometry, style) { mxCell.apply(this, arguments); } mxUtils.extend(CustomCell, mxCell); mxCodecRegistry.getCodec(mxCell).template = new CustomCell(); mxCodecRegistry.addAlias('CustomCell', 'mxCell');
mxCellCodec | Codec for mxCells. |
Functions | |
isCellCodec | Returns true since this is a cell codec. |
isExcluded | Excludes user objects that are XML nodes. |
afterEncode | Encodes an mxCell and wraps the XML up inside the XML of the user object (inversion). |
beforeDecode | Decodes an mxCell and uses the enclosing XML node as the user object for the cell (inversion). |
codec.afterEncode = function( enc, obj, node )
Encodes an mxCell and wraps the XML up inside the XML of the user object (inversion).
codec.beforeDecode = function( dec, node, obj )
Decodes an mxCell and uses the enclosing XML node as the user object for the cell (inversion).
Returns true since this is a cell codec.
codec.isCellCodec = function()
Excludes user objects that are XML nodes.
codec.isExcluded = function( obj, attr, value, isWrite )
Encodes an mxCell and wraps the XML up inside the XML of the user object (inversion).
codec.afterEncode = function( enc, obj, node )
Decodes an mxCell and uses the enclosing XML node as the user object for the cell (inversion).
codec.beforeDecode = function( dec, node, obj )