GraphicComponent
@combeenation/custom-code-utils
Class: GraphicComponent<TVisualName>
Represents a component of type Graphic
Can be used to set specific inputs of the general component or its containing visuals
Type Parameters
TVisualName
TVisualName extends string
Constructors
Constructor
new GraphicComponent<
TVisualName>(name):GraphicComponent<TVisualName>
Parameters
name
string
Returns
GraphicComponent<TVisualName>
Properties
name
readonlyname:string
Methods
onValueChanged()
onValueChanged(
listener,callImmediately,condition?):void
Parameters
listener
CmpValueChangedListener<string>
Called whenever the value (SVG string) of the given cmp has changed
callImmediately
boolean = false
True: The listener is immediately called with the current value of the cmp at the
time, the listener is added
False: The listener will be called for the first time when the value of the cmp
actually changes
condition?
CmpValueChangedCondition<string>
A predicate function which is given the new cmp value.
The function can decide on whether the listener is called or not by returning true or false.
Returns
void
setInput()
setInput(
property,value):void
Set an input value of the graphic component Hint: Ensure that the Hive rule actually processes the input when setting a value
Parameters
property
"Width" | "Height" | "Archive"
value
unknown
Returns
void
setVisualInput()
setVisualInput(
visual,property,value):void
Set an input value of a specific visual Hint: Ensure that the Hive rule actually processes the input when setting a value
Parameters
visual
TVisualName
Name of the visual
property
string
Name of the property as seen in the cfgr editor (e.g. 'X' or 'Texture.Source')
value
unknown
Value to set
Returns
void