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

Unified Diff: third_party/polymer/v1_0/components-chromium/iron-dropdown/iron-dropdown-extracted.js

Issue 1287713002: [MD settings] merge polymer 1.0.11; hack for settings checkbox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/polymer/v1_0/components-chromium/iron-dropdown/iron-dropdown-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/iron-dropdown/iron-dropdown-extracted.js b/third_party/polymer/v1_0/components-chromium/iron-dropdown/iron-dropdown-extracted.js
index cdc931d62d138736d3049bc68ca1286d4f34f435..405afe187bf9067914bca48413ce5df35133334a 100644
--- a/third_party/polymer/v1_0/components-chromium/iron-dropdown/iron-dropdown-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/iron-dropdown/iron-dropdown-extracted.js
@@ -1,5 +1,4 @@
-
- (function() {
+(function() {
'use strict';
Polymer({
@@ -34,6 +33,28 @@
},
/**
+ * A pixel value that will be added to the position calculated for the
+ * given `horizontalAlign`. Use a negative value to offset to the
+ * left, or a positive value to offset to the right.
+ */
+ horizontalOffset: {
+ type: Number,
+ value: 0,
+ notify: true
+ },
+
+ /**
+ * A pixel value that will be added to the position calculated for the
+ * given `verticalAlign`. Use a negative value to offset towards the
+ * top, or a positive value to offset towards the bottom.
+ */
+ verticalOffset: {
+ type: Number,
+ value: 0,
+ notify: true
+ },
+
+ /**
* The element that should be used to position the dropdown when
* it is opened.
*/
@@ -82,7 +103,7 @@
},
observers: [
- '_updateOverlayPosition(verticalAlign, horizontalAlign)'
+ '_updateOverlayPosition(verticalAlign, horizontalAlign, verticalOffset, horizontalOffset)'
],
attached: function() {
@@ -125,6 +146,8 @@
target = this._positionRect.left;
}
+ target += this.horizontalOffset;
+
return Math.max(target, 0);
},
@@ -137,6 +160,8 @@
target = this._positionRect.top;
}
+ target += this.verticalOffset;
+
return Math.max(target, 0);
},
@@ -274,5 +299,4 @@
}
}
});
- })();
-
+ })();

Powered by Google App Engine
This is Rietveld 408576698