ReferencetriggerSet

<triggerSet>

Groups a set of `<updateValue>` or `<callAction>` components which share a single trigger condition

<triggerSet> is a General Operator component that combines the actions of multiple <updateValue>, <triggerSet> and/or <callAction> components and allows them to be triggered by a single button click interaction or boolean condition.

Attributes and Properties

Attributes for <triggerSet>

Labels (1)

boolean. Default value: false. Whether to use this component's name as its rendered label.

Positioning (2)

point. Default value: \(\left( 0, 0 \right)\). Coordinates of the anchor point used to position this component on a graph.

positionFromAnchor

keyword. Where this component sits relative to its anchor point.

ValueDescription
upperRightPlace the component above and to the right of the anchor point.
upperLeftPlace the component above and to the left of the anchor point.
lowerRightPlace the component below and to the right of the anchor point.
lowerLeftPlace the component below and to the left of the anchor point.
topPlace the component directly above the anchor point.
bottomPlace the component directly below the anchor point.
leftPlace the component directly to the left of the anchor point.
rightPlace the component directly to the right of the anchor point.
center (default)Center the component on the anchor point.
Triggering (4)

boolean. Default value: false. Boolean expression that fires the action whenever it transitions to true.

reference. References to components whose click events should fire this action.

triggerWhenObjectsFocused

reference. References to components whose focus events should fire this action.

reference. References to components whose value changes should fire this action.

Other (1)
draggable

boolean. Default value: true. Whether the trigger set's button can be dragged on a graph.

Common to all components (9)
copy

reference. Create an independent copy of another component by reference. Enter a references a $name.

disabled

boolean. Default value: false. Whether this component is disabled and cannot be interacted with.

extend

reference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.

fixed

boolean. Default value: false. Whether this component's value is fixed and cannot be modified.

fixLocation

boolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

hide

boolean. Default value: false. Whether to hide this component from the rendered output.

isResponse

boolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.

name

text. The name used to reference this component from elsewhere in the document.

styleNumber

integer. Default value: 1. The style number used to select this component's visual styling from the available style definitions.

Properties for <triggerSet name="t">

Labels (2)
$t.label

label. The label rendered with this component.

$t.labelIsName

boolean. Whether to use this component's name as its rendered label.

Positioning (2)
$t.anchor

point. The coordinates where this component is anchored on the graph.

$t.positionFromAnchor

text. Where this component sits relative to its anchor point.

Other (5)
$t.disabled

boolean. Whether this component is disabled and cannot be interacted with.

$t.draggable

boolean. Whether the trigger set's button can be dragged on a graph.

$t.fixed

boolean. Whether this component's value is fixed and cannot be modified.

$t.fixLocation

boolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

$t.hidden

boolean. Whether this component is hidden from the rendered output.

Common to all components (4)
$t.doenetML

text. The DoenetML source code that produced this component.

$t.hide

boolean. Whether to hide this component from the rendered output.

$t.isResponse

boolean. Whether this component is treated as a response for the purposes of assessment.

$t.styleNumber

integer. The style number used to select this component's visual styling from the available style definitions.

Examples

Example: <triggerSet> with a button

A <triggerSet> is used to link muliple actions that take place with one button click.


Example: <triggerSet> on a graph

A <triggerSet> button can be rendered on a <graph>. The position of the button is specified with the anchor attribute.

Attribute Examples

Attribute Example: triggerWhen

The triggerWhen attribute takes a boolean condition as input. When the boolean condition evaluates to true, the actions within the <triggerSet> are performed.


Attribute Example: triggerWith

The triggerWith attribute takes a component reference as input. When the referenced component has a change in value, the actions within the <triggerSet> are performed.


Attribute Example: triggerWhenObjectsClicked

The triggerWhenObjectsClicked attribute takes a list of target “objects” as its input. Objects are components that have been defined within the graph and can be clicked.


Attribute Example: anchor

The anchor attribute specifies the position of the <triggerSet> button when placed within a <graph>.


Attribute Example: labelIsName

The labelIsName attribute is a shortcut to adding a <label> child to a <triggerSet>.