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

Method onDisplaying

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

Source from the content-addressed store, hash-verified

46
47class ToBehavior extends TimelineBehavior {
48 onDisplaying(container) {
49 let timeline = this.timeline = new Timeline();
50 let one=container.first, two=one.next, three=two.next, four=container.last, size=one.width;
51 let r=container.x+container.width-size, b=container.y+container.height-size;
52 timeline.to(one, { state: 3 }, 500, Math.quadEaseOut, 0);
53 timeline.to(two, { x: r, state: 3 }, 500, Math.quadEaseOut, -400);
54 timeline.to(three, { x: r, y: b, state: 3 }, 500, Math.quadEaseOut, -400);
55 timeline.to(four, { y: b, state: 3 }, 500, Math.quadEaseOut, -400);
56 super.startTimeline(container);
57 }
58}
59
60class FromBehavior extends TimelineBehavior {

Callers

nothing calls this directly

Calls 2

startTimelineMethod · 0.80
toMethod · 0.45

Tested by

no test coverage detected