<triggerSet>
<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: . Coordinates of the anchor point used to position this component on a graph.
positionFromAnchorkeyword. Where this component sits relative to its anchor point.
| Value | Description |
|---|---|
upperRight | Place the component above and to the right of the anchor point. |
upperLeft | Place the component above and to the left of the anchor point. |
lowerRight | Place the component below and to the right of the anchor point. |
lowerLeft | Place the component below and to the left of the anchor point. |
top | Place the component directly above the anchor point. |
bottom | Place the component directly below the anchor point. |
left | Place the component directly to the left of the anchor point. |
right | Place 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.
triggerWhenObjectsFocusedreference. References to components whose focus events should fire this action.
reference. References to components whose value changes should fire this action.
Other (1)
draggableboolean. Default value: true. Whether the trigger set's button can be dragged on a graph.
Common to all components (9)
copyreference. Create an independent copy of another component by reference. Enter a references a $name.
disabledboolean. Default value: false. Whether this component is disabled and cannot be interacted with.
extendreference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.
fixedboolean. Default value: false. Whether this component's value is fixed and cannot be modified.
fixLocationboolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
hideboolean. Default value: false. Whether to hide this component from the rendered output.
isResponseboolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.
nametext. The name used to reference this component from elsewhere in the document.
styleNumberinteger. 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.labellabel. The label rendered with this component.
$t.labelIsNameboolean. Whether to use this component's name as its rendered label.
Positioning (2)
$t.anchorpoint. The coordinates where this component is anchored on the graph.
$t.positionFromAnchortext. Where this component sits relative to its anchor point.
Other (5)
$t.disabledboolean. Whether this component is disabled and cannot be interacted with.
$t.draggableboolean. Whether the trigger set's button can be dragged on a graph.
$t.fixedboolean. Whether this component's value is fixed and cannot be modified.
$t.fixLocationboolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
Common to all components (4)
$t.doenetMLtext. The DoenetML source code that produced this component.
$t.hideboolean. Whether to hide this component from the rendered output.
$t.isResponseboolean. Whether this component is treated as a response for the purposes of assessment.
$t.styleNumberinteger. 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>.