<orbitalDiagramInput/>
<orbitalDiagramInput/> is a Subject-Specific
component that renders an interactive tool for student entry of orbital diagrams.
Attributes and Properties
Attributes for <orbitalDiagramInput>
Other (2)
orbitalDiagram. An orbital diagram used to prefill the input before the student begins.
textList. Text labels to prefill for each orbital row.
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 <orbitalDiagramInput name="o">
Other (9)
$o.disabledboolean. Whether this component is disabled and cannot be interacted with.
$o.fixedboolean. Whether this component's value is fixed and cannot be modified.
$o.fixLocationboolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
$o.numRowsinteger. The number of orbital rows in the diagram.
$o.rowsorbitalDiagram. The orbital diagram rows in display order (reversed from the underlying value).
integer. Index of the currently selected box within the selected row (1-based; 0 if none selected).
$o.selectedRowIndexinteger. Index of the currently selected orbital row (1-based; 0 if none selected).
$o.valueorbitalDiagram. The current orbital diagram entered by the student.
Common to all components (4)
$o.doenetMLtext. The DoenetML source code that produced this component.
$o.hideboolean. Whether to hide this component from the rendered output.
$o.isResponseboolean. Whether this component is treated as a response for the purposes of assessment.
$o.styleNumberinteger. The style number used to select this component's visual styling from the available style definitions.
Examples
Example: Default <orbitalDiagramInput/>
The default <orbitalDiagramInput/> contains one row with an empty label. Students
complete the diagram by typing in the correct sublevel into the label, and using
the buttons to add “box” entry fields and arrows to complete the diagram. Additional
rows are also added/removed with the buttons shown above the diagram. Check the
solution provided and experiment with the buttons to get a feel for how the tool behaves.
Attribute Examples
Attribute Example: prefill
The prefill attribute of the <orbitalDiagramInput/> component takes as its input either (1) an array of arrow directions listed by row or (2) the orbitalDiagram property of a named <atom> component. The first input method is illustrated above.
To enter the array of arrow directions, use “u” for an up arrow and “d” for a down arrow. Each row is listed in distinct parentheses. To prefill empty boxes, you can include comma-separated spaces within a row.
Attribute Example: prefill (2nd method)
The prefill attribute of the <orbitalDiagramInput/> component takes as its input either (1) an array of arrow directions listed by row or (2) the orbitalDiagram property of a named <atom> component. The second input method is illustrated above.
Attribute Example: prefillLabel
The prefillLabel attribute can be used to specify a prefill of the labels for each row of the <orbitalDiagramInput/>. The input for this attribute is a list of text labels, beginning with the label for the bottom row.
Property Examples
Property Example: value
The value property of the <orbitalDiagramInput/> returns a static copy of the user’s entered diagram values that is updated with each click interaction.
Property Example: rows
The rows property of the <orbitalDiagramInput/> returns the row values entered in the user’s diagram, rearranged such that the most recently entered rows appear on the bottom of the diagram and the first row entered appears on the top of the diagram.
Property Example: numRows
The numRows property of the <orbitalDiagramInput/> returns the number of rows entered into the diagram by the user.
Property Example: selectedBoxIndex
The selectedBoxIndex property of the <orbitalDiagramInput/> returns the index number of the diagram box of the active row (numbered from left to right) that is currently highlighted by the user.