* Moves the comment by a number of milliseconds. When * the given parameter is greater than 0 the comment moves * forward. Otherwise it moves backwards. * @param time - elapsed time in ms
(time:number)
| 400 | * @param time - elapsed time in ms |
| 401 | */ |
| 402 | public time(time:number):void { |
| 403 | this.ttl -= time; |
| 404 | if (this.ttl < 0) { |
| 405 | this.ttl = 0; |
| 406 | } |
| 407 | if (this.movable) { |
| 408 | this.update(); |
| 409 | } |
| 410 | if (this.ttl <= 0) { |
| 411 | this.finish(); |
| 412 | } |
| 413 | } |
| 414 | |
| 415 | /** |
| 416 | * Update the comment's position depending on its mode and |