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

Side by Side Diff: ui/login/login_ui_tools.js

Issue 399613002: Anti-shelf-overlapping fixes for several menus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Css fixes intersecting with another CL removed. Created 6 years, 4 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
« no previous file with comments | « ui/login/account_picker/user_pod_row.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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview JS helpers used on login.
7 */
8
9 cr.define('cr.ui.LoginUITools', function() {
10 return {
11 /**
12 * Computes max-height for an element so that it doesn't overlap shelf.
13 * @param {element} DOM element
14 */
15 getMaxHeightBeforeShelfOverlapping : function(element) {
16 var maxAllowedHeight =
17 $('outer-container').offsetHeight -
18 element.getBoundingClientRect().top -
19 parseInt(window.getComputedStyle(element).marginTop) -
20 parseInt(window.getComputedStyle(element).marginBottom);
21 return maxAllowedHeight;
22 }
23 }
24 });
OLDNEW
« no previous file with comments | « ui/login/account_picker/user_pod_row.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698