Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
update docs slightly.
Browse files Browse the repository at this point in the history
  • Loading branch information
sorvell committed Apr 1, 2014
1 parent 5772275 commit d47d176
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
12 changes: 6 additions & 6 deletions core-iconset.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
* This will automatically register the icon set "my-icons" to the iconset
* database. To use these icons from within another element, make a
* `core-iconset` element and call the `byId` method to retrieve a
* given iconset. To apply a particular icon to an element as a backgroundImage,
* the `applyAsBackground` method can be used. For example:
* given iconset. To apply a particular icon to an element, use the
* `applyIcon` method. For example:
*
* iconset.applyAsBackground(iconNode, 'car');
* iconset.applyIcon(iconNode, 'car');
*
* Themed icon sets are also supported. The `core-iconset` can contain child
* `property` elements that specify a theme with an offsetX and offsetY of the
Expand All @@ -50,7 +50,7 @@
*
* Then a themed icon can be applied like this:
*
* iconset.applyAsBackground(iconNode, 'car', 'special');
* iconset.applyIcon(iconNode, 'car', 'special');
*
* @element core-iconset
* @homepage github.io
Expand Down Expand Up @@ -176,7 +176,7 @@
* specify the pixel locaion in the iconset's src file for the given
* `icon` and `theme`. It's uncommon to call this method. It is useful,
* for example, to manually position a css backgroundImage to the proper
* offset. It's more common to use the `applyAsBackground` method.
* offset. It's more common to use the `applyIcon` method.
*
* @method getOffset
* @param {String|Number} icon The name of the icon or the index of the
Expand Down Expand Up @@ -207,7 +207,7 @@
* method does not size the element, and it's often necessary to set
* the element's height and width so that the background image is visible.
*
* @method applyAsBackground
* @method applyIcon
* @param {Element} element The element to which the background is
* applied.
* @param {String|Number} icon The name or index of the icon to apply.
Expand Down
11 changes: 3 additions & 8 deletions demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,15 @@

<html>
<head>

<title>core-iconset</title>

<script src="../platform/platform.js"></script>
<link rel="import" href="core-iconset.html">

<style>
polymer-ui-menu {
width: 300px;
}
</style>

</head>

<body unresolved>

<!-- Register an icon set; you can do this anywhere, including an HTMLImport! -->
<core-iconset id="my-icons" src="my-icons.png" width="96" iconSize="24"
icons="location place starta stopb bus car train walk">
Expand Down Expand Up @@ -71,7 +66,7 @@
this.style.height = this.style.width = iconset.iconSize + 'px';
// use iconset's applyAsBackground method to set the given icon
// as the element's background image.
iconset.applyAsBackground(this, icon);
iconset.applyIcon(this, icon);
}
}

Expand Down

0 comments on commit d47d176

Please sign in to comment.