Index: bower_components/core-dropdown/core-dropdown-overlay.html |
diff --git a/bower_components/core-dropdown/core-dropdown-overlay.html b/bower_components/core-dropdown/core-dropdown-overlay.html |
deleted file mode 100644 |
index b6399ab14d16a554d144227de4e0d2d1fea31f64..0000000000000000000000000000000000000000 |
--- a/bower_components/core-dropdown/core-dropdown-overlay.html |
+++ /dev/null |
@@ -1,153 +0,0 @@ |
-<!-- |
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved. |
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt |
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt |
-Code distributed by Google as part of the polymer project is also |
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt |
---> |
- |
-<link rel="import" href="../polymer/polymer.html"> |
-<link rel="import" href="../core-overlay/core-overlay.html"> |
- |
-<!-- |
- |
-`core-dropdown-overlay` is a helper class to position an overlay relative to another |
-element within the same offsetParent. |
- |
-@group Polymer Core Elements |
-@element core-dropdown-overlay |
-@extends core-overlay |
-@homepage github.io |
---> |
- |
-<polymer-element name="core-dropdown-overlay" extends="core-overlay"> |
-<script> |
- Polymer({ |
- |
- publish: { |
- |
- /** |
- * The `relatedTarget` is an element used to position the overlay. It should have |
- * the same offsetParent as the target. |
- * |
- * @attribute relatedTarget |
- * @type Node |
- */ |
- relatedTarget: null, |
- |
- /** |
- * The horizontal alignment of the overlay relative to the `relatedTarget`. |
- * `left` means the left edges are aligned together and `right` means the right |
- * edges are aligned together. |
- * |
- * @attribute halign |
- * @type 'left' | 'right' |
- * @default 'auto' |
- */ |
- halign: 'left', |
- |
- /** |
- * The vertical alignment of the overlay relative to the `relatedTarget`. `top` |
- * means the top edges are aligned together and `bottom` means the bottom edges |
- * are aligned together. |
- * |
- * @attribute valign |
- * @type 'top' | 'bottom' |
- * @default 'top' |
- */ |
- valign: 'top' |
- |
- }, |
- |
- measure: function() { |
- var target = this.target; |
- // remember position, because core-overlay may have set the property |
- var pos = target.style.position; |
- |
- // get the size of the target as if it's positioned in the top left |
- // corner of the screen |
- target.style.position = 'fixed'; |
- target.style.left = '0px'; |
- target.style.top = '0px'; |
- |
- var rect = target.getBoundingClientRect(); |
- |
- target.style.position = pos; |
- target.style.left = null; |
- target.style.top = null; |
- |
- return rect; |
- }, |
- |
- resetTargetDimensions: function() { |
- var dims = this.dimensions; |
- var style = this.target.style; |
- if (dims.position.h_by === this.localName) { |
- style[dims.position.h] = null; |
- } |
- if (dims.position.v_by === this.localName) { |
- style[dims.position.v] = null; |
- } |
- this.super(); |
- }, |
- |
- positionTarget: function() { |
- if (!this.relatedTarget) { |
- this.super(); |
- return; |
- } |
- |
- var target = this.target; |
- var related = this.relatedTarget; |
- |
- // explicitly set width/height, because we don't want it constrained |
- // to the offsetParent |
- var rect = this.measure(); |
- target.style.width = rect.width + 'px'; |
- target.style.height = rect.height + 'px'; |
- |
- var t_op = target.offsetParent; |
- var r_op = related.offsetParent; |
- if (window.ShadowDOMPolyfill) { |
- t_op = wrap(t_op); |
- r_op = wrap(r_op); |
- } |
- |
- if (t_op !== r_op && t_op !== related) { |
- console.warn('core-dropdown-overlay: dropdown\'s offsetParent must be the relatedTarget or the relatedTarget\'s offsetParent!'); |
- } |
- |
- // Don't use CSS to handle halign/valign so we can use |
- // dimensions.position to detect custom positioning |
- |
- var dims = this.dimensions; |
- var margin = dims.margin; |
- var inside = t_op === related; |
- |
- if (!dims.position.h) { |
- if (this.halign === 'right') { |
- target.style.right = ((inside ? 0 : t_op.offsetWidth - related.offsetLeft - related.offsetWidth) - margin.right) + 'px'; |
- dims.position.h = 'right'; |
- } else { |
- target.style.left = ((inside ? 0 : related.offsetLeft) - margin.left) + 'px'; |
- dims.position.h = 'left'; |
- } |
- dims.position.h_by = this.localName; |
- } |
- |
- if (!dims.position.v) { |
- if (this.valign === 'bottom') { |
- target.style.bottom = ((inside ? 0 : t_op.offsetHeight - related.offsetTop - related.offsetHeight) - margin.bottom) + 'px'; |
- dims.position.v = 'bottom'; |
- } else { |
- target.style.top = ((inside ? 0 : related.offsetTop) - margin.top) + 'px'; |
- dims.position.v = 'top'; |
- } |
- dims.position.v_by = this.localName; |
- } |
- } |
- |
- }); |
- </script> |
-</polymer-element> |