MCPcopy Create free account
hub / github.com/SpringRoll/SpringRoll / action

Method action

src/controller/Key.js:42–53  ·  view source on GitHub ↗

* Calls the relevant action for the current state of the key. * @memberof Key

()

Source from the content-addressed store, hash-verified

40 * @memberof Key
41 */
42 action() {
43 if (1 === this.state) {
44 if (this.actions.down) {
45 this.actions.down();
46 }
47 } else if (2 === this.state) {
48 if (this.actions.up) {
49 this.actions.up();
50 }
51 this.updateState(0);
52 }
53 }
54
55 /**
56 *

Callers 1

updateMethod · 0.80

Calls 1

updateStateMethod · 0.95

Tested by

no test coverage detected