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

Method onDisplaying

examples/piu/marquee/main.js:24–31  ·  view source on GitHub ↗
(label)

Source from the content-addressed store, hash-verified

22
23class MarqueeBehavior extends Behavior {
24 onDisplaying(label) {
25 let timeline = this.timeline = new Timeline();
26 timeline.on(label, { x: [application.width, -label.width] }, 5000, Math.linearEase, 0);
27 timeline.seekTo(0);
28 label.duration = timeline.duration;
29 label.time = 0;
30 label.start();
31 }
32 onTimeChanged(label) {
33 let time = label.time;
34 this.timeline.seekTo(time);

Callers

nothing calls this directly

Calls 3

startMethod · 0.65
onMethod · 0.45
seekToMethod · 0.45

Tested by

no test coverage detected