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

Method onDisplaying

examples/piu/timeline/main.js:61–70  ·  view source on GitHub ↗
(container)

Source from the content-addressed store, hash-verified

59
60class FromBehavior extends TimelineBehavior {
61 onDisplaying(container) {
62 let timeline = this.timeline = new Timeline();
63 let one=container.first, two=one.next, three=two.next, four=container.last, size=one.width;
64 let r=container.x+container.width-size, b=container.y+container.height-size;
65 timeline.from(one, { state: 3 }, 500, Math.quadEaseOut, 0);
66 timeline.from(two, { x: r, state: 3 }, 500, Math.quadEaseOut, -400);
67 timeline.from(three, { x: r, y: b, state: 3 }, 500, Math.quadEaseOut, -400);
68 timeline.from(four, { y: b, state: 3 }, 500, Math.quadEaseOut, -400);
69 super.startTimeline(container);
70 }
71}
72
73class OnBehavior extends TimelineBehavior {

Callers

nothing calls this directly

Calls 2

startTimelineMethod · 0.80
fromMethod · 0.45

Tested by

no test coverage detected