| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 /** | 4 /** |
| 5 * @unrestricted | 5 * @unrestricted |
| 6 */ | 6 */ |
| 7 PerfUI.ChartViewport = class extends UI.VBox { | 7 PerfUI.ChartViewport = class extends UI.VBox { |
| 8 constructor() { | 8 constructor() { |
| 9 super(true); | 9 super(true); |
| 10 | 10 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 this._dragStartPointX = 0; | 79 this._dragStartPointX = 0; |
| 80 this._dragStartPointY = 0; | 80 this._dragStartPointY = 0; |
| 81 this._dragStartScrollTop = 0; | 81 this._dragStartScrollTop = 0; |
| 82 this._timeWindowLeft = 0; | 82 this._timeWindowLeft = 0; |
| 83 this._timeWindowRight = 0; | 83 this._timeWindowRight = 0; |
| 84 this._offsetWidth = 0; | 84 this._offsetWidth = 0; |
| 85 this._offsetHeight = 0; | 85 this._offsetHeight = 0; |
| 86 this._totalHeight = 0; | 86 this._totalHeight = 0; |
| 87 this._pendingAnimationTimeLeft = 0; | 87 this._pendingAnimationTimeLeft = 0; |
| 88 this._pendingAnimationTimeRight = 0; | 88 this._pendingAnimationTimeRight = 0; |
| 89 this._updateContentElementSize(); |
| 89 } | 90 } |
| 90 | 91 |
| 91 /** | 92 /** |
| 92 * @private | 93 * @private |
| 93 */ | 94 */ |
| 94 _updateContentElementSize() { | 95 _updateContentElementSize() { |
| 95 var offsetWidth = this._vScrollElement.offsetLeft; | 96 var offsetWidth = this._vScrollElement.offsetLeft; |
| 96 if (!offsetWidth) | 97 if (!offsetWidth) |
| 97 offsetWidth = this.contentElement.offsetWidth; | 98 offsetWidth = this.contentElement.offsetWidth; |
| 98 this._offsetWidth = offsetWidth; | 99 this._offsetWidth = offsetWidth; |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 } | 437 } |
| 437 this._cancelAnimation(); | 438 this._cancelAnimation(); |
| 438 this._cancelWindowTimesAnimation = UI.animateFunction( | 439 this._cancelWindowTimesAnimation = UI.animateFunction( |
| 439 this.element.window(), this._animateWindowTimes.bind(this), | 440 this.element.window(), this._animateWindowTimes.bind(this), |
| 440 [{from: this._timeWindowLeft, to: startTime}, {from: this._timeWindowRig
ht, to: endTime}], 5, | 441 [{from: this._timeWindowLeft, to: startTime}, {from: this._timeWindowRig
ht, to: endTime}], 5, |
| 441 this._animationCompleted.bind(this)); | 442 this._animationCompleted.bind(this)); |
| 442 this._pendingAnimationTimeLeft = startTime; | 443 this._pendingAnimationTimeLeft = startTime; |
| 443 this._pendingAnimationTimeRight = endTime; | 444 this._pendingAnimationTimeRight = endTime; |
| 444 } | 445 } |
| 445 }; | 446 }; |
| OLD | NEW |