Chromium Code Reviews| Index: Source/devtools/front_end/components/FlameChart.js |
| diff --git a/Source/devtools/front_end/components/FlameChart.js b/Source/devtools/front_end/components/FlameChart.js |
| index 56d9baa0b72e07fb74d2ab28bf427dc907dd0280..405b9718458b759a11c899cea0cefcab358eab07 100644 |
| --- a/Source/devtools/front_end/components/FlameChart.js |
| +++ b/Source/devtools/front_end/components/FlameChart.js |
| @@ -563,12 +563,11 @@ WebInspector.FlameChart.prototype = { |
| */ |
| _onMouseWheel: function(e) |
| { |
| - var scrollIsThere = this._totalHeight > this._offsetHeight; |
| - |
| + // Pan vertically when shift down only. |
| + var panVertically = e.shiftKey && (e.wheelDeltaY || Math.abs(e.wheelDeltaX) === 120); |
|
alph
2014/08/12 14:49:59
just curious what does |x| === 120 part do?
|
| var panHorizontally = Math.abs(e.wheelDeltaX) > Math.abs(e.wheelDeltaY) && !e.shiftKey; |
| - var panVertically = scrollIsThere && ((e.wheelDeltaY && !e.shiftKey) || (Math.abs(e.wheelDeltaX) === 120 && !e.shiftKey)); |
| if (panVertically) { |
| - this._vScrollElement.scrollTop -= e.wheelDeltaY / 120 * this._offsetHeight / 8; |
| + this._vScrollElement.scrollTop -= (e.wheelDeltaX || e.wheelDeltaY) / 120 * this._offsetHeight / 8; |
|
alph
2014/08/12 14:49:59
maybe: y || x
|
| } else if (panHorizontally) { |
| var shift = -e.wheelDeltaX * this._pixelToTime; |
| this._muteAnimation = true; |