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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/perf_ui/ChartViewport.js

Issue 2876793007: DevTools: Fix flamechart jumping on mouseout (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @unrestricted 6 * @unrestricted
7 */ 7 */
8 PerfUI.ChartViewport = class extends UI.VBox { 8 PerfUI.ChartViewport = class extends UI.VBox {
9 constructor() { 9 constructor() {
10 super(true); 10 super(true);
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 * @param {!MouseEvent} event 165 * @param {!MouseEvent} event
166 * @return {boolean} 166 * @return {boolean}
167 */ 167 */
168 _startDragging(event) { 168 _startDragging(event) {
169 if (event.shiftKey) 169 if (event.shiftKey)
170 return false; 170 return false;
171 if (this._windowRight === Infinity) 171 if (this._windowRight === Infinity)
172 return false; 172 return false;
173 this._isDragging = true; 173 this._isDragging = true;
174 this._initMaxDragOffset(event); 174 this._initMaxDragOffset(event);
175 this._dragStartPointX = event.offsetX; 175 this._dragStartPointX = event.pageX;
176 this._dragStartPointY = event.offsetY; 176 this._dragStartPointY = event.pageY;
177 this._dragStartScrollTop = this._vScrollElement.scrollTop; 177 this._dragStartScrollTop = this._vScrollElement.scrollTop;
178 this.viewportElement.style.cursor = ''; 178 this.viewportElement.style.cursor = '';
179 this.hideHighlight(); 179 this.hideHighlight();
180 return true; 180 return true;
181 } 181 }
182 182
183 /** 183 /**
184 * @param {!MouseEvent} event 184 * @param {!MouseEvent} event
185 */ 185 */
186 _dragging(event) { 186 _dragging(event) {
187 var pixelShift = this._dragStartPointX - event.offsetX; 187 var pixelShift = this._dragStartPointX - event.pageX;
188 this._dragStartPointX = event.offsetX; 188 this._dragStartPointX = event.pageX;
189 this._muteAnimation = true; 189 this._muteAnimation = true;
190 this._handlePanGesture(pixelShift * this._pixelToTime); 190 this._handlePanGesture(pixelShift * this._pixelToTime);
191 this._muteAnimation = false; 191 this._muteAnimation = false;
192 var pixelScroll = this._dragStartPointY - event.offsetY; 192 var pixelScroll = this._dragStartPointY - event.pageY;
193 this._vScrollElement.scrollTop = this._dragStartScrollTop + pixelScroll; 193 this._vScrollElement.scrollTop = this._dragStartScrollTop + pixelScroll;
194 this._updateMaxDragOffset(event.offsetX, event.offsetY); 194 this._updateMaxDragOffset(event.pageX, event.pageY);
195 } 195 }
196 196
197 /** 197 /**
198 * @private 198 * @private
199 */ 199 */
200 _endDragging() { 200 _endDragging() {
201 this._isDragging = false; 201 this._isDragging = false;
202 this._updateHighlight(); 202 this._updateHighlight();
203 } 203 }
204 204
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 } 467 }
468 this._cancelAnimation(); 468 this._cancelAnimation();
469 this._cancelWindowTimesAnimation = UI.animateFunction( 469 this._cancelWindowTimesAnimation = UI.animateFunction(
470 this.element.window(), this._animateWindowTimes.bind(this), 470 this.element.window(), this._animateWindowTimes.bind(this),
471 [{from: this._timeWindowLeft, to: startTime}, {from: this._timeWindowRig ht, to: endTime}], 5, 471 [{from: this._timeWindowLeft, to: startTime}, {from: this._timeWindowRig ht, to: endTime}], 5,
472 this._animationCompleted.bind(this)); 472 this._animationCompleted.bind(this));
473 this._pendingAnimationTimeLeft = startTime; 473 this._pendingAnimationTimeLeft = startTime;
474 this._pendingAnimationTimeRight = endTime; 474 this._pendingAnimationTimeRight = endTime;
475 } 475 }
476 }; 476 };
OLDNEW
« 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