Defines a state that can be used to determine the geometry of a label with a ILabelModel.
Remarks
Typically, implementations of this interface are created by factory methods of the corresponding model.
This interface extends the ICloneable interface. This allows clients to obtain a persistent copy of the current state of this parameter. Immutable parameter implementations may return themselves.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.graph.ILabelModelParameter
See Also
Properties
Gets the model that can be used to determine the geometry of a label given this parameter and a label instance.
Methods
Create a clone of this object.
Determines whether this parameter can be used for a given label instance.
Remarks
label
. For example, a parameter might only support labels that are owned by an INode.Parameters
A map of options to pass to the method.
- label - ILabel
- The label to test.
Returns
- ↪boolean
true
if this instance can be used for the given label,false
otherwise.
Static Methods
Deserializes a JavaScript object which has been created by serializeParameter.
Remarks
Parameters
A map of options to pass to the method.
- serializedData - Object
- The JavaScript object to deserialize.
Returns
- ↪ILabelModelParameter
- The deserialized parameter.
Throws
- Exception({ name: 'Error' })
- if the given
serializedData
could not be serialized.
See Also
Serializes the given ILabelModelParameter into a JavaScript object from which the parameter can be restored.
Remarks
The name of the ILabelModel is provided with the property ModelName
.
ILabelModelParameter types which are provided with the yFiles for HTML library can be deserialized automatically with methods deserializeParameter.
Parameters
A map of options to pass to the method.
- parameter - ILabelModelParameter
- The ILabelModelParameter instance to serialize.
Returns
- ↪Record<string,unknown>
- A JavaScript object from which the parameter can be restored.