Commit 9285f505 authored by alph@chromium.org's avatar alph@chromium.org

DevTools: Fix timeline overview window selection

The window selection is shown in a left corner when drag was initiated on a marker.

R=pfeldman@chromium.org

Review URL: https://codereview.chromium.org/211343003

git-svn-id: svn://svn.chromium.org/blink/trunk@169954 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 38618f00
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment