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

Method onTimeChanged

tools/mcsim/ControlsPane.js:422–436  ·  view source on GitHub ↗
(row)

Source from the content-addressed store, hash-verified

420 model.DEVICE.first.delegate(data.event, data);
421 }
422 onTimeChanged(row) {
423 let data = this.data;
424 let container = row.first.next;
425 let content = container.first;
426 if (this.direction > 0) {
427 content.width = Math.round(container.width * row.fraction);
428 container.next.string = this.secondsToString(Math.round((row.duration - row.time) / 1000));
429 }
430 else {
431 content.width = Math.round(container.width * (1 - row.fraction));
432 container.next.string = this.secondsToString(Math.round(row.time / 1000));
433 }
434 if ("tick" in data)
435 model.DEVICE.first.delegate(data.tick, data);
436 }
437 reverse() {
438 this.direction = 0 - this.direction;
439 }

Callers

nothing calls this directly

Calls 2

secondsToStringMethod · 0.80
delegateMethod · 0.80

Tested by

no test coverage detected