mxChildChangeCodec

Codec for mxChildChanges.  This class is created and registered dynamically at load time and used implicitly via mxCodec and the mxCodecRegistry.

Transient Fields

  • model
  • previous
  • previousIndex
  • child

Reference Fields

  • parent
Summary
mxChildChangeCodecCodec for mxChildChanges.
Functions
isReferenceReturns true for the child attribute if the child cell had a previous parent or if we’re reading the child as an attribute rather than a child node, in which case it’s always a reference.
isExcludedExcludes references to parent or previous if not in the model.
afterEncodeEncodes the child recusively and adds the result to the given node.
beforeDecodeDecodes the any child nodes as using the respective codec from the registry.
afterDecodeRestores object state in the child change.

Functions

isReference

codec.isReference = function(obj,
attr,
value,
isWrite)

Returns true for the child attribute if the child cell had a previous parent or if we’re reading the child as an attribute rather than a child node, in which case it’s always a reference.

isExcluded

codec.isExcluded = function(obj,
attr,
value,
write)

Excludes references to parent or previous if not in the model.

afterEncode

codec.afterEncode = function(enc,
obj,
node)

Encodes the child recusively and adds the result to the given node.

beforeDecode

codec.beforeDecode = function(dec,
node,
obj)

Decodes the any child nodes as using the respective codec from the registry.

afterDecode

codec.afterDecode = function(dec,
node,
obj)

Restores object state in the child change.

Action to add or remove a child in a model.
codec.isReference = function(obj,
attr,
value,
isWrite)
Returns true for the child attribute if the child cell had a previous parent or if we’re reading the child as an attribute rather than a child node, in which case it’s always a reference.
codec.isExcluded = function(obj,
attr,
value,
write)
Excludes references to parent or previous if not in the model.
codec.afterEncode = function(enc,
obj,
node)
Encodes the child recusively and adds the result to the given node.
codec.beforeDecode = function(dec,
node,
obj)
Decodes the any child nodes as using the respective codec from the registry.
codec.afterDecode = function(dec,
node,
obj)
Restores object state in the child change.
XML codec for JavaScript object graphs.
Singleton class that acts as a global registry for codecs.
Close