From 3c9e6e0374d24286d0ecb60d77fc80036d41e6dc Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 24 Feb 2016 16:18:53 -0500 Subject: [PATCH] update components --- .../iron-a11y-keys-behavior/.bower.json | 6 +-- .../iron-fit-behavior/.bower.json | 10 ++--- .../iron-fit-behavior/.travis.yml | 13 +++--- .../iron-fit-behavior/CONTRIBUTING.md | 11 +++-- .../iron-fit-behavior/bower.json | 4 +- .../iron-fit-behavior/demo/index.html | 10 +++-- .../iron-fit-behavior/iron-fit-behavior.html | 40 +++++++++++------- .../iron-fit-behavior/test/index.html | 17 ++++---- .../test/iron-fit-behavior.html | 42 ++++++++++++++++++- .../bower_components/iron-icon/.bower.json | 6 +-- 10 files changed, 109 insertions(+), 50 deletions(-) diff --git a/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json b/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json index ce8190653a..6a6c623777 100644 --- a/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json +++ b/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json @@ -30,14 +30,14 @@ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "ignore": [], - "homepage": "https://github.com/polymerelements/iron-a11y-keys-behavior", + "homepage": "https://github.com/PolymerElements/iron-a11y-keys-behavior", "_release": "1.1.1", "_resolution": { "type": "version", "tag": "v1.1.1", "commit": "12af7cb19b2c6b3887e37a5ea1501ffe676d1e8a" }, - "_source": "git://github.com/polymerelements/iron-a11y-keys-behavior.git", + "_source": "git://github.com/PolymerElements/iron-a11y-keys-behavior.git", "_target": "^1.0.0", - "_originalSource": "polymerelements/iron-a11y-keys-behavior" + "_originalSource": "PolymerElements/iron-a11y-keys-behavior" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-fit-behavior/.bower.json b/dashboard-ui/bower_components/iron-fit-behavior/.bower.json index b33aab0e48..1318aaf6e9 100644 --- a/dashboard-ui/bower_components/iron-fit-behavior/.bower.json +++ b/dashboard-ui/bower_components/iron-fit-behavior/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-fit-behavior", - "version": "1.0.5", + "version": "1.0.6", "license": "http://polymer.github.io/LICENSE.txt", "description": "Fits an element inside another element", "private": true, @@ -24,16 +24,16 @@ "paper-styles": "polymerelements/paper-styles#^1.0.2", "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", "test-fixture": "PolymerElements/test-fixture#^1.0.0", - "web-component-tester": "polymer/web-component-tester#^3.4.0", + "web-component-tester": "^4.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "ignore": [], "homepage": "https://github.com/PolymerElements/iron-fit-behavior", - "_release": "1.0.5", + "_release": "1.0.6", "_resolution": { "type": "version", - "tag": "v1.0.5", - "commit": "18dec1eb5c7217be4d360c0fb9101fe899136f92" + "tag": "v1.0.6", + "commit": "f2e868af4fad643ffb7fea3501e1429acc4ec0f0" }, "_source": "git://github.com/PolymerElements/iron-fit-behavior.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-fit-behavior/.travis.yml b/dashboard-ui/bower_components/iron-fit-behavior/.travis.yml index d499daff79..899ec45bc6 100644 --- a/dashboard-ui/bower_components/iron-fit-behavior/.travis.yml +++ b/dashboard-ui/bower_components/iron-fit-behavior/.travis.yml @@ -1,22 +1,25 @@ language: node_js sudo: false before_script: - - npm install web-component-tester - - npm install bower - - 'export PATH=$PWD/node_modules/.bin:$PATH' + - npm install -g bower polylint web-component-tester - bower install + - polylint env: global: - secure: QL2j7nfSA/40iIPMKLMosv9hj8q7eGBbPQXVQmCL3uXD5qoMPTqo1qronKKX+bi3Rh7W104ufV4CzzbWvBwQh8gipx+4REGijzc77Fro2y3v3/wUp9H/UEWnbhAWPDsqEoAD8xQXFHkVv7874/VwOlubQyXDGlvqh0fzYbUNUQo= - secure: ajBo8YcSzi4kNuCHcmajCirWQKf5Mj4OZ3tQjNAcJJAy0UtyrAgTenayWN2ijKqD5V8wfTK66jUXGYMZkoJV4EpknrUliqRgRqKHHfULXYWRSC7lDGxf835ReFxstkPun4HmNtxraAWJgmgFz7mylntTVKm46Ce4INj3n8reWaY= -node_js: 4 + - CXX=g++-4.8 +node_js: stable addons: - firefox: '42.0' + firefox: latest apt: sources: - google-chrome + - ubuntu-toolchain-r-test packages: - google-chrome-stable + - g++-4.8 + sauce_connect: true script: - xvfb-run wct - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi" diff --git a/dashboard-ui/bower_components/iron-fit-behavior/CONTRIBUTING.md b/dashboard-ui/bower_components/iron-fit-behavior/CONTRIBUTING.md index 7b10141565..f147978a3e 100644 --- a/dashboard-ui/bower_components/iron-fit-behavior/CONTRIBUTING.md +++ b/dashboard-ui/bower_components/iron-fit-behavior/CONTRIBUTING.md @@ -5,6 +5,11 @@ https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md If you edit that file, it will get updated everywhere else. If you edit this file, your changes will get overridden :) + +You can however override the jsbin link with one that's customized to this +specific element: + +jsbin=https://jsbin.com/cagaye/edit?html,output --> # Polymer Elements ## Guide for Contributors @@ -41,7 +46,7 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag 3. Click the `paper-foo` element. ``` - 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output). + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output). 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. @@ -51,14 +56,14 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag When submitting pull requests, please provide: - 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax: + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax: ```markdown (For a single issue) Fixes #20 (For multiple issues) - Fixes #32, #40 + Fixes #32, fixes #40 ``` 2. **A succinct description of the design** used to fix any related issues. For example: diff --git a/dashboard-ui/bower_components/iron-fit-behavior/bower.json b/dashboard-ui/bower_components/iron-fit-behavior/bower.json index 7e0c31d75f..86c8582164 100644 --- a/dashboard-ui/bower_components/iron-fit-behavior/bower.json +++ b/dashboard-ui/bower_components/iron-fit-behavior/bower.json @@ -1,6 +1,6 @@ { "name": "iron-fit-behavior", - "version": "1.0.5", + "version": "1.0.6", "license": "http://polymer.github.io/LICENSE.txt", "description": "Fits an element inside another element", "private": true, @@ -24,7 +24,7 @@ "paper-styles": "polymerelements/paper-styles#^1.0.2", "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", "test-fixture": "PolymerElements/test-fixture#^1.0.0", - "web-component-tester": "polymer/web-component-tester#^3.4.0", + "web-component-tester": "^4.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "ignore": [] diff --git a/dashboard-ui/bower_components/iron-fit-behavior/demo/index.html b/dashboard-ui/bower_components/iron-fit-behavior/demo/index.html index b841deff6e..1a3f4d8f98 100644 --- a/dashboard-ui/bower_components/iron-fit-behavior/demo/index.html +++ b/dashboard-ui/bower_components/iron-fit-behavior/demo/index.html @@ -24,8 +24,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN @@ -33,8 +34,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - centered in window + + Centered in window.

+ Resize the window and click here to refit.
diff --git a/dashboard-ui/bower_components/iron-fit-behavior/iron-fit-behavior.html b/dashboard-ui/bower_components/iron-fit-behavior/iron-fit-behavior.html index d21740f3e6..1705f31a20 100644 --- a/dashboard-ui/bower_components/iron-fit-behavior/iron-fit-behavior.html +++ b/dashboard-ui/bower_components/iron-fit-behavior/iron-fit-behavior.html @@ -171,14 +171,14 @@ CSS properties | Action * the memoized data. */ resetFit: function() { - if (!this._fitInfo || !this._fitInfo.sizedBy.height) { - this.sizingTarget.style.maxHeight = ''; - this.style.top = this._fitInfo ? this._fitInfo.inlineStyle.top : ''; - } if (!this._fitInfo || !this._fitInfo.sizedBy.width) { this.sizingTarget.style.maxWidth = ''; - this.style.left = this._fitInfo ? this._fitInfo.inlineStyle.left : ''; } + if (!this._fitInfo || !this._fitInfo.sizedBy.height) { + this.sizingTarget.style.maxHeight = ''; + } + this.style.top = this._fitInfo ? this._fitInfo.inlineStyle.top : ''; + this.style.left = this._fitInfo ? this._fitInfo.inlineStyle.left : ''; if (this._fitInfo) { this.style.position = this._fitInfo.positionedBy.css; } @@ -239,18 +239,30 @@ CSS properties | Action * `position:fixed`. */ center: function() { - if (!this._fitInfo.positionedBy.vertically || !this._fitInfo.positionedBy.horizontally) { - // need position:fixed to center - this.style.position = 'fixed'; + var positionedBy = this._fitInfo.positionedBy; + if (positionedBy.vertically && positionedBy.horizontally) { + // Already positioned. + return; } - if (!this._fitInfo.positionedBy.vertically) { - var top = (this._fitHeight - this.offsetHeight) / 2 + this._fitTop; - top -= this._fitInfo.margin.top; + // Need position:fixed to center + this.style.position = 'fixed'; + // Take into account the offset caused by parents that create stacking + // contexts (e.g. with transform: translate3d). Translate to 0,0 and + // measure the bounding rect. + if (!positionedBy.vertically) { + this.style.top = '0px'; + } + if (!positionedBy.horizontally) { + this.style.left = '0px'; + } + // It will take in consideration margins and transforms + var rect = this.getBoundingClientRect(); + if (!positionedBy.vertically) { + var top = this._fitTop - rect.top + (this._fitHeight - rect.height) / 2; this.style.top = top + 'px'; } - if (!this._fitInfo.positionedBy.horizontally) { - var left = (this._fitWidth - this.offsetWidth) / 2 + this._fitLeft; - left -= this._fitInfo.margin.left; + if (!positionedBy.horizontally) { + var left = this._fitLeft - rect.left + (this._fitWidth - rect.width) / 2; this.style.left = left + 'px'; } } diff --git a/dashboard-ui/bower_components/iron-fit-behavior/test/index.html b/dashboard-ui/bower_components/iron-fit-behavior/test/index.html index 5c3084c677..fd047ea3d0 100644 --- a/dashboard-ui/bower_components/iron-fit-behavior/test/index.html +++ b/dashboard-ui/bower_components/iron-fit-behavior/test/index.html @@ -1,5 +1,4 @@ - - - - +--> iron-fit-behavior tests @@ -23,12 +20,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - + + + diff --git a/dashboard-ui/bower_components/iron-fit-behavior/test/iron-fit-behavior.html b/dashboard-ui/bower_components/iron-fit-behavior/test/iron-fit-behavior.html index b08ca06636..46fdf4f7ec 100644 --- a/dashboard-ui/bower_components/iron-fit-behavior/test/iron-fit-behavior.html +++ b/dashboard-ui/bower_components/iron-fit-behavior/test/iron-fit-behavior.html @@ -46,6 +46,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN height: 200px; } + .sized-xy { + width: 200px; + height: 200px; + } + .positioned-left { position: absolute; left: 100px; @@ -83,6 +88,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + + + + +