MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / leftStillDown

Method leftStillDown

contributed/modClock/main.js:1235–1255  ·  view source on GitHub ↗
(button)

Source from the content-addressed store, hash-verified

1233 }
1234
1235 leftStillDown(button) {
1236 let now = Time.ticks;
1237 if (this.clock.uiState === STATE_SHOW_TIME) {
1238 if (button.elapsed > CYCLE_MODE_MS) {
1239 button.lastModeChanged = now;
1240 this.clock.uiMode = MODE_SET;
1241 this.clock.uiState = STATE_CYCLE_MODE;
1242 this.clock.showMode(this.clock.uiMode);
1243 }
1244 }
1245 else if (this.clock.uiState === STATE_CYCLE_MODE) {
1246 if (now - button.lastModeChanged > CYCLE_ITERATE_MS) {
1247 button.lastModeChanged = now;
1248 this.clock.uiMode += 1;
1249 if (this.clock.uiMode > MODE_MAX)
1250 this.clock.uiMode = 0;
1251 this.clock.showMode(this.clock.uiMode);
1252 }
1253 }
1254trace(`leftStillDown\n`);
1255 }
1256
1257}
1258

Callers

nothing calls this directly

Calls 1

showModeMethod · 0.80

Tested by

no test coverage detected