| 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 /** | 377 /** |
| 378 * @param {number} clientWidth | 378 * @param {number} clientWidth |
| 379 * @param {number=} paddingLeft | 379 * @param {number=} paddingLeft |
| 380 */ | 380 */ |
| 381 setDisplayWindow(clientWidth, paddingLeft) { | 381 setDisplayWindow(clientWidth, paddingLeft) { |
| 382 this._paddingLeft = paddingLeft || 0; | 382 this._paddingLeft = paddingLeft || 0; |
| 383 this._workingArea = clientWidth - this._paddingLeft; | 383 this._workingArea = clientWidth - this._paddingLeft; |
| 384 } | 384 } |
| 385 | 385 |
| 386 reset() { | 386 reset() { |
| 387 this.setBounds(0, 1000); | 387 this.setBounds(0, 100); |
| 388 } | 388 } |
| 389 | 389 |
| 390 /** | 390 /** |
| 391 * @override | 391 * @override |
| 392 * @param {number} value | 392 * @param {number} value |
| 393 * @param {number=} precision | 393 * @param {number=} precision |
| 394 * @return {string} | 394 * @return {string} |
| 395 */ | 395 */ |
| 396 formatValue(value, precision) { | 396 formatValue(value, precision) { |
| 397 return Number.preciseMillisToString(value - this.zeroTime(), precision); | 397 return Number.preciseMillisToString(value - this.zeroTime(), precision); |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 left: haveRecords && startTime ? Math.min((startTime - absoluteMin) / time
Span, 1) : 0, | 575 left: haveRecords && startTime ? Math.min((startTime - absoluteMin) / time
Span, 1) : 0, |
| 576 right: haveRecords && endTime < Infinity ? (endTime - absoluteMin) / timeS
pan : 1 | 576 right: haveRecords && endTime < Infinity ? (endTime - absoluteMin) / timeS
pan : 1 |
| 577 }; | 577 }; |
| 578 } | 578 } |
| 579 | 579 |
| 580 resetCanvas() { | 580 resetCanvas() { |
| 581 this._canvas.width = this.element.clientWidth * window.devicePixelRatio; | 581 this._canvas.width = this.element.clientWidth * window.devicePixelRatio; |
| 582 this._canvas.height = this.element.clientHeight * window.devicePixelRatio; | 582 this._canvas.height = this.element.clientHeight * window.devicePixelRatio; |
| 583 } | 583 } |
| 584 }; | 584 }; |
| OLD | NEW |