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 @@ |
} |
} |
}); |
- })(); |
- |
+ })(); |