| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 | 521 |
| 522 /** | 522 /** |
| 523 * @override | 523 * @override |
| 524 * @param {number} x | 524 * @param {number} x |
| 525 * @return {!Promise<?Element>} | 525 * @return {!Promise<?Element>} |
| 526 */ | 526 */ |
| 527 popoverElementPromise(x) { | 527 popoverElementPromise(x) { |
| 528 if (!this._filmStripModel.frames().length) | 528 if (!this._filmStripModel.frames().length) |
| 529 return Promise.resolve(/** @type {?Element} */ (null)); | 529 return Promise.resolve(/** @type {?Element} */ (null)); |
| 530 | 530 |
| 531 var time = this._calculator.positionToTime(x); | 531 var time = this.calculator().positionToTime(x); |
| 532 var frame = this._filmStripModel.frameByTimestamp(time); | 532 var frame = this._filmStripModel.frameByTimestamp(time); |
| 533 if (frame === this._lastFrame) | 533 if (frame === this._lastFrame) |
| 534 return Promise.resolve(this._lastElement); | 534 return Promise.resolve(this._lastElement); |
| 535 var imagePromise = frame ? this._imageByFrame(frame) : Promise.resolve(this.
_emptyImage); | 535 var imagePromise = frame ? this._imageByFrame(frame) : Promise.resolve(this.
_emptyImage); |
| 536 return imagePromise.then(createFrameElement.bind(this)); | 536 return imagePromise.then(createFrameElement.bind(this)); |
| 537 | 537 |
| 538 /** | 538 /** |
| 539 * @this {Timeline.TimelineFilmStripOverview} | 539 * @this {Timeline.TimelineFilmStripOverview} |
| 540 * @param {!HTMLImageElement} image | 540 * @param {!HTMLImageElement} image |
| 541 * @return {?Element} | 541 * @return {?Element} |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 counters[group] = this._quantDuration; | 779 counters[group] = this._quantDuration; |
| 780 this._callback(counters); | 780 this._callback(counters); |
| 781 interval -= this._quantDuration; | 781 interval -= this._quantDuration; |
| 782 } | 782 } |
| 783 this._counters = []; | 783 this._counters = []; |
| 784 this._counters[group] = interval; | 784 this._counters[group] = interval; |
| 785 this._lastTime = time; | 785 this._lastTime = time; |
| 786 this._remainder = this._quantDuration - interval; | 786 this._remainder = this._quantDuration - interval; |
| 787 } | 787 } |
| 788 }; | 788 }; |
| OLD | NEW |