(label)
| 22 | |
| 23 | class 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); |