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

Method updateState

src/controller/Key.js:32–36  ·  view source on GitHub ↗

* * Updates the internal state of the key. Accepts a range between 0-2. Will set key state to 0 if nothing is passed. * @param {0 | 1 | 2} [state=0] * @memberof Key

(state = 0)

Source from the content-addressed store, hash-verified

30 * @memberof Key
31 */
32 updateState(state = 0) {
33 if (state < 3 && state > -1) {
34 this._state = state;
35 }
36 }
37
38 /**
39 * Calls the relevant action for the current state of the key.

Callers 3

actionMethod · 0.95
onWindowBlurMethod · 0.45
onKeyMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected