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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui_lazy/OverviewGrid.js

Issue 2451033002: DevTools: Allow several drag handlers running simultaneously. (Closed)
Patch Set: fix timeline overview window selection Created 4 years, 1 month 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 | « third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js ('k') | 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 271
272 /** 272 /**
273 * @param {!Event} event 273 * @param {!Event} event
274 * @return {boolean} 274 * @return {boolean}
275 */ 275 */
276 _startWindowDragging: function(event) 276 _startWindowDragging: function(event)
277 { 277 {
278 this._dragStartPoint = event.pageX; 278 this._dragStartPoint = event.pageX;
279 this._dragStartLeft = this.windowLeft; 279 this._dragStartLeft = this.windowLeft;
280 this._dragStartRight = this.windowRight; 280 this._dragStartRight = this.windowRight;
281 event.stopPropagation();
281 return true; 282 return true;
282 }, 283 },
283 284
284 /** 285 /**
285 * @param {!Event} event 286 * @param {!Event} event
286 */ 287 */
287 _windowDragging: function(event) 288 _windowDragging: function(event)
288 { 289 {
289 event.preventDefault(); 290 event.preventDefault();
290 var delta = (event.pageX - this._dragStartPoint) / this._parentElement.c lientWidth; 291 var delta = (event.pageX - this._dragStartPoint) / this._parentElement.c lientWidth;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 position = Math.max(0, Math.min(position, this._width)); 457 position = Math.max(0, Math.min(position, this._width));
457 if (position < this._startPosition) { 458 if (position < this._startPosition) {
458 this._windowSelector.style.left = position + "px"; 459 this._windowSelector.style.left = position + "px";
459 this._windowSelector.style.right = this._width - this._startPosition + "px"; 460 this._windowSelector.style.right = this._width - this._startPosition + "px";
460 } else { 461 } else {
461 this._windowSelector.style.left = this._startPosition + "px"; 462 this._windowSelector.style.left = this._startPosition + "px";
462 this._windowSelector.style.right = this._width - position + "px"; 463 this._windowSelector.style.right = this._width - position + "px";
463 } 464 }
464 } 465 }
465 }; 466 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698