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

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

Issue 211343003: DevTools: Fix timeline overview window selection (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/OverviewGrid.js
diff --git a/Source/devtools/front_end/OverviewGrid.js b/Source/devtools/front_end/OverviewGrid.js
index 6b72b7f34303cdc59c036a514253fcc1c66e920b..4d8db240f38f42c8ca36e6d2bf29f65a3320edf1 100644
--- a/Source/devtools/front_end/OverviewGrid.js
+++ b/Source/devtools/front_end/OverviewGrid.js
@@ -252,8 +252,8 @@ WebInspector.OverviewGrid.Window.prototype = {
{
if (!this._enabled)
return false;
- this._offsetLeft = event.pageX - event.offsetX;
- var position = event.pageX - this._offsetLeft;
+ this._offsetLeft = this._parentElement.totalOffsetLeft();
+ var position = event.x - this._offsetLeft;
this._overviewWindowSelector = new WebInspector.OverviewGrid.WindowSelector(this._parentElement, position);
return true;
},
@@ -263,7 +263,7 @@ WebInspector.OverviewGrid.Window.prototype = {
*/
_windowSelectorDragging: function(event)
{
- this._overviewWindowSelector._updatePosition(event.pageX - this._offsetLeft);
+ this._overviewWindowSelector._updatePosition(event.x - this._offsetLeft);
event.preventDefault();
},
@@ -272,7 +272,7 @@ WebInspector.OverviewGrid.Window.prototype = {
*/
_endWindowSelectorDragging: function(event)
{
- var window = this._overviewWindowSelector._close(event.pageX - this._offsetLeft);
+ var window = this._overviewWindowSelector._close(event.x - this._offsetLeft);
delete this._overviewWindowSelector;
if (window.end === window.start) { // Click, not drag.
var middle = window.end;
« 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