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

Unified Diff: chrome/browser/resources/settings/device_page/layout_behavior.js

Issue 2522103002: MD Settings: Display: Fix runtime error (Closed)
Patch Set: Move test to display_layout.js 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/device_page/layout_behavior.js
diff --git a/chrome/browser/resources/settings/device_page/layout_behavior.js b/chrome/browser/resources/settings/device_page/layout_behavior.js
index 33e2162e7018d5708102b7e6ed868cb94407eef1..82690a726b71269779ea0b7ac106fb89b7ef1937 100644
--- a/chrome/browser/resources/settings/device_page/layout_behavior.js
+++ b/chrome/browser/resources/settings/device_page/layout_behavior.js
@@ -81,11 +81,12 @@ var LayoutBehavior = {
* bounds for the display.
* @return {!chrome.system.display.Bounds}
*/
- updateDisplayBounds(id, newBounds) {
+ updateDisplayBounds: function(id, newBounds) {
this.dragLayoutId = id;
// Find the closest parent.
var closestId = this.findClosest_(id, newBounds);
dpapad 2016/11/23 18:18:43 Nit (optional): var closestId = assert(this.findCl
stevenjb 2016/11/23 18:44:32 Personal nit: I'm not a huge fan of wrapping essen
Dan Beam 2016/11/23 20:46:55 JS != C++
+ assert(closestId);
// Find the closest edge.
var closestBounds = this.getCalculatedDisplayBounds(closestId);
@@ -128,7 +129,7 @@ var LayoutBehavior = {
* Called when dragging ends. Sends the updated layout to chrome.
* @param {string} id
*/
- finishUpdateDisplayBounds(id) {
+ finishUpdateDisplayBounds: function(id) {
this.highlightEdge_('', undefined); // Remove any highlights.
if (id != this.dragLayoutId || !this.dragBounds_ ||
!this.dragLayoutPosition_) {

Powered by Google App Engine
This is Rietveld 408576698