* Update the comment's position depending on the applied motion * groups.
()
| 453 | * groups. |
| 454 | */ |
| 455 | public animate():void { |
| 456 | if (this._alphaMotion) { |
| 457 | this.alpha = |
| 458 | (this.dur - this.ttl) * |
| 459 | (this._alphaMotion['to'] - this._alphaMotion['from']) / |
| 460 | this.dur + |
| 461 | this._alphaMotion['from']; |
| 462 | } |
| 463 | if (this.motion.length === 0) { |
| 464 | return; |
| 465 | } |
| 466 | var ttl:number = Math.max(this.ttl, 0); |
| 467 | var time:number = (this.dur - ttl) - this._motionStart[this._curMotion]; |
| 468 | this._execMotion(this.motion[this._curMotion], time); |
| 469 | if (this.dur - ttl > this._motionEnd[this._curMotion]) { |
| 470 | this._curMotion++; |
| 471 | if (this._curMotion >= this.motion.length) { |
| 472 | this._curMotion = this.motion.length - 1; |
| 473 | } |
| 474 | return; |
| 475 | } |
| 476 | } |
| 477 | |
| 478 | /** |
| 479 | * Notify the comment to stop. This has no effect if the comment |
no test coverage detected