update polymer

This commit is contained in:
Luke Pulverenti 2015-10-27 10:58:38 -04:00
parent 6825ae319e
commit 2d53ff29c5
106 changed files with 3070 additions and 1567 deletions

View file

@ -1,7 +1,7 @@
{
"name": "iron-iconset-svg",
"description": "Manages a set of svg icons",
"version": "1.0.6",
"version": "1.0.8",
"keywords": [
"web-components",
"polymer",
@ -30,11 +30,11 @@
"web-component-tester": "*"
},
"homepage": "https://github.com/polymerelements/iron-iconset-svg",
"_release": "1.0.6",
"_release": "1.0.8",
"_resolution": {
"type": "version",
"tag": "v1.0.6",
"commit": "ebd17924942abe6110aa0fe81b1b31e1fcc34a9f"
"tag": "v1.0.8",
"commit": "7f8b0a5800254247cb518356aee983155374f519"
},
"_source": "git://github.com/polymerelements/iron-iconset-svg.git",
"_target": "^1.0.0",

View file

@ -1,7 +1,7 @@
{
"name": "iron-iconset-svg",
"description": "Manages a set of svg icons",
"version": "1.0.6",
"version": "1.0.8",
"keywords": [
"web-components",
"polymer",

View file

@ -18,9 +18,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
* `iron-iconset-svg` element. Multiple icons should be given distinct id's.
*
* Using svg elements to create icons has a few advantages over traditional
* bitmap graphics like jpg or png. Icons that use svg are vector based so they
* are resolution independent and should look good on any device. They are
* stylable via css. Icons can be themed, colorized, and even animated.
* bitmap graphics like jpg or png. Icons that use svg are vector based so
* they are resolution independent and should look good on any device. They
* are stylable via css. Icons can be themed, colorized, and even animated.
*
* Example:
*
@ -45,18 +45,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
*
* @element iron-iconset-svg
* @demo demo/index.html
* @implements {Polymer.Iconset}
*/
Polymer({
is: 'iron-iconset-svg',
properties: {
/**
* The name of the iconset.
*
* @attribute name
* @type string
*/
name: {
type: String,
@ -65,10 +62,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
/**
* The size of an individual icon. Note that icons must be square.
*
* @attribute iconSize
* @type number
* @default 24
*/
size: {
type: Number,
@ -76,6 +69,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
}
},
attached: function() {
this.style.display = 'none';
},
/**
* Construct an array of all icon names in this iconset.
@ -98,7 +95,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
* @method applyIcon
* @param {Element} element Element to which the icon is applied.
* @param {string} iconName Name of the icon to apply.
* @return {Element} The svg element which renders the icon.
* @return {?Element} The svg element which renders the icon.
*/
applyIcon: function(element, iconName) {
// insert svg element into shadow root, if it exists

View file

@ -78,6 +78,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
expect(meta.byKey('foo')).to.be.equal(iconset);
});
test('it does not have a size', function () {
var rect = iconset.getBoundingClientRect();
expect(rect.width).to.be.equal(0);
expect(rect.height).to.be.equal(0);
});
test('it fires an iron-iconset-added event on the window', function() {
return loadedPromise;
});
@ -93,6 +99,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
div = elements[1];
});
test('it does not have a size', function () {
var rect = iconset.getBoundingClientRect();
expect(rect.width).to.be.equal(0);
expect(rect.height).to.be.equal(0);
});
test('appends a child to the target element', function () {
expect(div.firstElementChild).to.not.be.ok;
iconset.applyIcon(div, 'circle');