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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 | 434 |
435 /** | 435 /** |
436 * @param {?MouseEvent} e | 436 * @param {?MouseEvent} e |
437 */ | 437 */ |
438 _onMouseWheel: function(e) | 438 _onMouseWheel: function(e) |
439 { | 439 { |
440 var windowLeft = this._timeWindowLeft ? this._timeWindowLeft : this._dat
aProvider.zeroTime(); | 440 var windowLeft = this._timeWindowLeft ? this._timeWindowLeft : this._dat
aProvider.zeroTime(); |
441 var windowRight = this._timeWindowRight !== Infinity ? this._timeWindowR
ight : this._dataProvider.zeroTime() + this._dataProvider.totalTime(); | 441 var windowRight = this._timeWindowRight !== Infinity ? this._timeWindowR
ight : this._dataProvider.zeroTime() + this._dataProvider.totalTime(); |
442 | 442 |
443 if (e.wheelDeltaY) { | 443 if (e.wheelDeltaY) { |
444 if (e.altKey) { | 444 if (!e.altKey) { |
445 const mouseWheelZoomSpeed = 1 / 120; | 445 const mouseWheelZoomSpeed = 1 / 120; |
446 var zoom = Math.pow(1.2, -e.wheelDeltaY * mouseWheelZoomSpeed) -
1; | 446 var zoom = Math.pow(1.2, -e.wheelDeltaY * mouseWheelZoomSpeed) -
1; |
447 var cursorTime = this._cursorTime(e.offsetX); | 447 var cursorTime = this._cursorTime(e.offsetX); |
448 windowLeft += (windowLeft - cursorTime) * zoom; | 448 windowLeft += (windowLeft - cursorTime) * zoom; |
449 windowRight += (windowRight - cursorTime) * zoom; | 449 windowRight += (windowRight - cursorTime) * zoom; |
450 } else { | 450 } else { |
451 this._vScrollElement.scrollTop -= e.wheelDeltaY / 120 * this._of
fsetHeight / 8; | 451 this._vScrollElement.scrollTop -= e.wheelDeltaY / 120 * this._of
fsetHeight / 8; |
452 } | 452 } |
453 } else { | 453 } else { |
454 var shift = e.wheelDeltaX * this._pixelToTime; | 454 var shift = e.wheelDeltaX * this._pixelToTime; |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 reset: function() | 805 reset: function() |
806 { | 806 { |
807 this._highlightedEntryIndex = -1; | 807 this._highlightedEntryIndex = -1; |
808 this._selectedEntryIndex = -1; | 808 this._selectedEntryIndex = -1; |
809 this._textWidth = {}; | 809 this._textWidth = {}; |
810 this.update(); | 810 this.update(); |
811 }, | 811 }, |
812 | 812 |
813 __proto__: WebInspector.HBox.prototype | 813 __proto__: WebInspector.HBox.prototype |
814 } | 814 } |
OLD | NEW |