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

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

Issue 1097163004: DevTools: zoom frames upon double click, iterate over frames using arrows. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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 | Annotate | Revision Log
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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 379
380 // We allow actual time window to be arbitrarily small but don't want th e UI window to be too small. 380 // We allow actual time window to be arbitrarily small but don't want th e UI window to be too small.
381 var widthInPixels = width * this._parentElement.clientWidth; 381 var widthInPixels = width * this._parentElement.clientWidth;
382 var minWidthInPixels = WebInspector.OverviewGrid.MinSelectableSize / 2; 382 var minWidthInPixels = WebInspector.OverviewGrid.MinSelectableSize / 2;
383 if (widthInPixels < minWidthInPixels) { 383 if (widthInPixels < minWidthInPixels) {
384 var factor = minWidthInPixels / widthInPixels; 384 var factor = minWidthInPixels / widthInPixels;
385 left = ((windowRight + windowLeft) - width * factor) / 2; 385 left = ((windowRight + windowLeft) - width * factor) / 2;
386 right = ((windowRight + windowLeft) + width * factor) / 2; 386 right = ((windowRight + windowLeft) + width * factor) / 2;
387 } 387 }
388 388
389 if (windowLeft === this.windowLeft && windowRight === this.windowRight)
390 return;
391
389 this.windowLeft = windowLeft; 392 this.windowLeft = windowLeft;
390 this._leftResizeElement.style.left = left * 100 + "%"; 393 this._leftResizeElement.style.left = left * 100 + "%";
391 this.windowRight = windowRight; 394 this.windowRight = windowRight;
392 this._rightResizeElement.style.left = right * 100 + "%"; 395 this._rightResizeElement.style.left = right * 100 + "%";
393 396
394 this._overviewWindowElement.style.left = left * 100 + "%"; 397 this._overviewWindowElement.style.left = left * 100 + "%";
395 this._overviewWindowBordersElement.style.left = left * 100 + "%"; 398 this._overviewWindowBordersElement.style.left = left * 100 + "%";
396 this._overviewWindowElement.style.width = (right - left) * 100 + "%"; 399 this._overviewWindowElement.style.width = (right - left) * 100 + "%";
397 this._overviewWindowBordersElement.style.right = (1 - right) * 100 + "%" ; 400 this._overviewWindowBordersElement.style.right = (1 - right) * 100 + "%" ;
398 401
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 position = Math.max(0, Math.min(position, this._width)); 497 position = Math.max(0, Math.min(position, this._width));
495 if (position < this._startPosition) { 498 if (position < this._startPosition) {
496 this._windowSelector.style.left = position + "px"; 499 this._windowSelector.style.left = position + "px";
497 this._windowSelector.style.right = this._width - this._startPosition + "px"; 500 this._windowSelector.style.right = this._width - this._startPosition + "px";
498 } else { 501 } else {
499 this._windowSelector.style.left = this._startPosition + "px"; 502 this._windowSelector.style.left = this._startPosition + "px";
500 this._windowSelector.style.right = this._width - position + "px"; 503 this._windowSelector.style.right = this._width - position + "px";
501 } 504 }
502 } 505 }
503 } 506 }
OLDNEW
« Source/devtools/front_end/ui/Dialog.js ('K') | « Source/devtools/front_end/ui/Dialog.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698