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

Side by Side Diff: chrome/browser/resources/shared/js/cr/ui/bubble.js

Issue 7661027: ntp4: make bubble wider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | « chrome/browser/resources/shared/css/bubble.css ('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 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // require: event_tracker.js 5 // require: event_tracker.js
6 6
7 cr.define('cr.ui', function() { 7 cr.define('cr.ui', function() {
8 8
9 /** 9 /**
10 * Bubble is a free-floating informational bubble with a triangular arrow 10 * Bubble is a free-floating informational bubble with a triangular arrow
(...skipping 24 matching lines...) Expand all
35 }, 35 },
36 36
37 /** 37 /**
38 * Sets the anchor node, i.e. the node that this bubble points at. 38 * Sets the anchor node, i.e. the node that this bubble points at.
39 * @param {HTMLElement} node The new anchor node. 39 * @param {HTMLElement} node The new anchor node.
40 */ 40 */
41 set anchorNode(node) { 41 set anchorNode(node) {
42 this.anchorNode_ = node; 42 this.anchorNode_ = node;
43 43
44 if (!this.hidden) 44 if (!this.hidden)
45 reposition(); 45 this.reposition();
46 }, 46 },
47 47
48 /** 48 /**
49 * Updates the position of the bubble. This is automatically called when 49 * Updates the position of the bubble. This is automatically called when
50 * the window is resized, but should also be called any time the layout 50 * the window is resized, but should also be called any time the layout
51 * may have changed. 51 * may have changed.
52 */ 52 */
53 reposition: function() { 53 reposition: function() {
54 var node = this.anchorNode_; 54 var node = this.anchorNode_;
55 var clientRect = node.getBoundingClientRect(); 55 var clientRect = node.getBoundingClientRect();
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 e.stopPropagation(); 108 e.stopPropagation();
109 e.preventDefault(); 109 e.preventDefault();
110 return; 110 return;
111 }, 111 },
112 }; 112 };
113 113
114 return { 114 return {
115 Bubble: Bubble 115 Bubble: Bubble
116 }; 116 };
117 }); 117 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/shared/css/bubble.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698