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..3425b77d86721bf3ae85d6fdf1c419a79fe18e2a 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); |
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.wheelDeltaY || e.wheelDeltaX) / 120 * this._offsetHeight / 8; |
} else if (panHorizontally) { |
var shift = -e.wheelDeltaX * this._pixelToTime; |
this._muteAnimation = true; |