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

Unified Diff: ui/webui/resources/js/cr/ui/position_util.js

Issue 1574063003: MD History: Add basic material design history cards and history items (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed 1 line Created 4 years, 11 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: ui/webui/resources/js/cr/ui/position_util.js
diff --git a/ui/webui/resources/js/cr/ui/position_util.js b/ui/webui/resources/js/cr/ui/position_util.js
index 14b29d92d97b9d3d592255e0787d15c820979376..7f8a6146b13c2cbae705afeedb7d69a5037656d4 100644
--- a/ui/webui/resources/js/cr/ui/position_util.js
+++ b/ui/webui/resources/js/cr/ui/position_util.js
@@ -226,8 +226,9 @@ cr.define('cr.ui', function() {
* @param {number} x The client x position.
* @param {number} y The client y position.
* @param {!HTMLElement} popupElement The popup element we are positioning.
+ * @param {cr.ui.AnchorType} opt_anchorType The type of anchoring we want.
tsergeant 2016/01/29 03:27:19 You'll need to mark this as optional for this to c
yingran 2016/01/29 04:17:52 Done.
*/
- function positionPopupAtPoint(x, y, popupElement) {
+ function positionPopupAtPoint(x, y, popupElement, opt_anchorType) {
var rect = {
left: x,
top: y,
@@ -236,7 +237,9 @@ cr.define('cr.ui', function() {
right: x,
bottom: y
};
- positionPopupAroundRect(rect, popupElement, AnchorType.BELOW);
+
+ var anchorType = opt_anchorType || AnchorType.BELOW;
+ positionPopupAroundRect(rect, popupElement, anchorType);
}
// Export

Powered by Google App Engine
This is Rietveld 408576698