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

Unified Diff: chrome/browser/resources/md_user_manager/user_manager.js

Issue 1642323004: User Manager MD User Pods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments, fixed google colors Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/md_user_manager/user_manager.js
diff --git a/chrome/browser/resources/md_user_manager/user_manager.js b/chrome/browser/resources/md_user_manager/user_manager.js
index 158bac1f8a2e1d3d81b7d1a005e94f50ee4035ee..698e5f956f6ed8492277927caadb0a512f76198b 100644
--- a/chrome/browser/resources/md_user_manager/user_manager.js
+++ b/chrome/browser/resources/md_user_manager/user_manager.js
@@ -24,6 +24,23 @@ cr.define('cr.ui', function() {
UserManager.prototype = {
__proto__: DisplayManager.prototype,
+
+ /**
+ * @override
+ * Overrides clientAreaSize in DisplayManager. When a new profile is created
+ * the #outer-container page may not be visible yet, so user-pods cannot be
+ * placed correctly. Therefore, we use dimensions of the #animated-pages.
+ * @type {{width: string, height: string}}
+ */
+ get clientAreaSize() {
+ var animatedPages = $('animatedPages');
+ var width = animatedPages.offsetWidth;
+ // Deduct the maximum possible height of the #login-header-bar (including
+ // the padding and the border) from the height of #animated-pages. Result
+ // is the remaining visible height.
+ var height = animatedPages.offsetHeight - 57;
Dan Beam 2016/03/25 02:48:23 why the magic 57? can you get this dynamically or
Moe 2016/04/04 14:55:09 Done. Unfortunately, can't get this dynamically, s
+ return {width: width, height: height};
+ }
};
/**

Powered by Google App Engine
This is Rietveld 408576698