ReferenceupdateValue

<updateValue>

<updateValue> is a General Operator component that changes the value or property of a named component based on a button click interaction or a boolean condition.

Attributes and Properties

Attributes for <updateValue>
AttributeTypeValues
anchor = "…"point
draggable = "…"boolean"true" "false"
labelIsName = "…"boolean"true" "false"
newValue = "…"
positionFromAnchor = "…"text"upperright" "upperleft" "lowerright" "lowerleft" "top" "bottom" "left" "right" "center"
simplify = "…"text"none" "full" "numbers" "numberspreserveorder"
target = "…"
triggerWhen = "…""true" "false"
triggerWhenObjectsClicked = "…"
triggerWhenObjectsFocused = "…"
triggerWith = "…"
type = "…""math" "number" "boolean" "text"
Props for <updateValue name="u">
PropertyType
$u.anchorpoint
$u.disabledboolean
$u.draggableboolean
$u.fixedboolean
$u.fixLocationboolean
$u.hiddenboolean
$u.labellabel
$u.labelIsNameboolean
$u.positionFromAnchortext
$u.simplifytext

Example: Change the color of a <circle>

An <updateValue> is used to change the styleNumber property of a named <circle> from the default value (11) to 22. Once this change occurs, the button becomes disabled.


Example: Change the value of a <number>

An <updateValue> is used to change the value of a <number> based on the number’s current value.


Attribute Example: target

The target attribute specifies which component or component property to update.


Attribute Example: type

The type attribute specifies the type of component that is changing. The default type is math, and valid values are math, number, boolean, or text.


Attribute Example: newValue

The newValue attribute specifies the new value for the target or target property.


Attribute Example: disabled

The disabled attribute takes a boolean condition. When the condition evaluates to true, the button becomes disabled.


Attribute Example: triggerWhen

The triggerWhen attribute establishes a boolean condition for triggering when the value should be updated. In this case, the circle turns blue when the correct answer is entered.


Attribute Example: triggerWith

The triggerWith attribute allows the update to occur based on interaction with another specified component. In this way, the actions of two or more <updateValue> components may be chained together.


Attribute Example: triggerWhenObjectsClicked

Updates can be triggered by click interactions with graphical components defined within a <graph> using the triggerWhenObjectsClicked attribute.