| 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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 /** | 433 /** |
| 434 * @interface | 434 * @interface |
| 435 */ | 435 */ |
| 436 UI.TimelineOverview = function() {}; | 436 UI.TimelineOverview = function() {}; |
| 437 | 437 |
| 438 UI.TimelineOverview.prototype = { | 438 UI.TimelineOverview.prototype = { |
| 439 /** | 439 /** |
| 440 * @param {!Element} parentElement | 440 * @param {!Element} parentElement |
| 441 * @param {?Element=} insertBefore | 441 * @param {?Element=} insertBefore |
| 442 */ | 442 */ |
| 443 show: function(parentElement, insertBefore) {}, | 443 show(parentElement, insertBefore) {}, |
| 444 | 444 |
| 445 update: function() {}, | 445 update() {}, |
| 446 | 446 |
| 447 dispose: function() {}, | 447 dispose() {}, |
| 448 | 448 |
| 449 reset: function() {}, | 449 reset() {}, |
| 450 | 450 |
| 451 /** | 451 /** |
| 452 * @param {number} x | 452 * @param {number} x |
| 453 * @return {!Promise<?Element>} | 453 * @return {!Promise<?Element>} |
| 454 */ | 454 */ |
| 455 popoverElementPromise: function(x) {}, | 455 popoverElementPromise(x) {}, |
| 456 | 456 |
| 457 /** | 457 /** |
| 458 * @param {!Event} event | 458 * @param {!Event} event |
| 459 * @return {boolean} | 459 * @return {boolean} |
| 460 */ | 460 */ |
| 461 onClick: function(event) {}, | 461 onClick(event) {}, |
| 462 | 462 |
| 463 /** | 463 /** |
| 464 * @param {number} windowLeft | 464 * @param {number} windowLeft |
| 465 * @param {number} windowRight | 465 * @param {number} windowRight |
| 466 * @return {!{startTime: number, endTime: number}} | 466 * @return {!{startTime: number, endTime: number}} |
| 467 */ | 467 */ |
| 468 windowTimes: function(windowLeft, windowRight) {}, | 468 windowTimes(windowLeft, windowRight) {}, |
| 469 | 469 |
| 470 /** | 470 /** |
| 471 * @param {number} startTime | 471 * @param {number} startTime |
| 472 * @param {number} endTime | 472 * @param {number} endTime |
| 473 * @return {!{left: number, right: number}} | 473 * @return {!{left: number, right: number}} |
| 474 */ | 474 */ |
| 475 windowBoundaries: function(startTime, endTime) {}, | 475 windowBoundaries(startTime, endTime) {}, |
| 476 | 476 |
| 477 timelineStarted: function() {}, | 477 timelineStarted() {}, |
| 478 | 478 |
| 479 timelineStopped: function() {}, | 479 timelineStopped() {}, |
| 480 }; | 480 }; |
| 481 | 481 |
| 482 /** | 482 /** |
| 483 * @implements {UI.TimelineOverview} | 483 * @implements {UI.TimelineOverview} |
| 484 * @unrestricted | 484 * @unrestricted |
| 485 */ | 485 */ |
| 486 UI.TimelineOverviewBase = class extends UI.VBox { | 486 UI.TimelineOverviewBase = class extends UI.VBox { |
| 487 constructor() { | 487 constructor() { |
| 488 super(); | 488 super(); |
| 489 /** @type {?UI.TimelineOverviewCalculator} */ | 489 /** @type {?UI.TimelineOverviewCalculator} */ |
| (...skipping 85 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 |