Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1533)

Unified Diff: Source/devtools/front_end/FlameChart.js

Issue 216613002: FlameChart: make flame chart vertically draggable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/FlameChart.js
diff --git a/Source/devtools/front_end/FlameChart.js b/Source/devtools/front_end/FlameChart.js
index f4af1affcb9333c23db84e06233a6453b739b582..464639d38855fa9c1fe83ac7eb792335eb545771 100644
--- a/Source/devtools/front_end/FlameChart.js
+++ b/Source/devtools/front_end/FlameChart.js
@@ -354,7 +354,9 @@ WebInspector.FlameChart.prototype = {
return false;
this._isDragging = true;
this._maxDragOffset = 0;
- this._dragStartPoint = event.pageX;
+ this._dragStartPointX = event.pageX;
+ this._dragStartPointY = event.pageY;
+ this._dragStartScrollTop = this._vScrollElement.scrollTop;
this._dragStartWindowLeft = this._timeWindowLeft;
this._dragStartWindowRight = this._timeWindowRight;
this._canvas.style.cursor = "";
@@ -367,7 +369,9 @@ WebInspector.FlameChart.prototype = {
*/
_canvasDragging: function(event)
{
- var pixelShift = this._dragStartPoint - event.pageX;
+ var pixelShift = this._dragStartPointX - event.pageX;
+ var pixelScroll = this._dragStartPointY - event.pageY;
+ this._vScrollElement.scrollTop = this._dragStartScrollTop + pixelScroll;
var windowShift = pixelShift / this._totalPixels;
var windowTime = this._windowWidth * this._totalTime;
var timeShift = windowTime * pixelShift / this._pixelWindowWidth;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698