← 수업 제작 도구
홈 › Components › Action Button (행동 버튼)

Action Button (행동 버튼)

원본: Computation Layer 문서(Action Button (행동 버튼)). 문서의 Try It 예제가 가리키는 화면 12개를 기록했고, 화면마다 CL 코드를 한국어로 풀어 썼다.

화면 2·3·5에는 주석과 코드가 다른 곳이 있다. 주석의 "a_list"는 코드에서 `a_{list}`로 적혀 있다.

화면이름CL 수문서 항목 설명 (원문 일부)
1Action Button.timeSincePress [source]1timeSincePressmaxTime: number Gets the seconds (plus milliseconds) since the "Submit" button was pressed. It resets to zero if the "reset" l…
2Action Button.history [source]2historykey: string Gets the history of a variable that was defined using the "capture" sink.
3Action Button.lastValue [source]2lastValuekey: string Gets the last value captured for a variable that was defined using the "capture" sink.
4Action Button.pressCount [source]1pressCount Gets the number of times the action button has been pressed.
5Action Button.capture [sink]2capturekey: string Sets a variable you want to capture every time the action button is pressed. (Retrieve the history of that variable later…
6Action Button.label [sink]1label Sets the text to show on the button. Keep it short.
7Action Button.resetLabel [sink]2resetLabel Sets the link text we'll show that lets the student reset the action button.
8Action Button.disabled [sink]2disabled Sets a Boolean that determines when the action button is disabled or enabled. (When it's disabled, we gray out the button and make …
9Action Button.style [sink]1style Sets the button style. Use "default" for our standard blue style. Other options are "red" for a warning or for a confirmatory second c…
10Button.resetStyle [sink]2resetStyle Sets the button style when in "reset" state. Use "link" for our standard link or "white" for button styling on a dark background.
11Action Button.resetOnChange [sink]3resetOnChange Specify a string value. If that value changes, the component resets.
12Action Button.hidden [sink]2hidden When true, this component will not be shown to students.