Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Unified Diff: lib/iron_iconset.dart

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/iron_icon.dart ('k') | lib/iron_iconset_svg.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/iron_iconset.dart
diff --git a/lib/iron_iconset.dart b/lib/iron_iconset.dart
index 882b410fe8eefe4dc56c8842dcaf6ab696224e0b..f04e8ad56893fd38cdebecaa75f11b8e2a3813d3 100644
--- a/lib/iron_iconset.dart
+++ b/lib/iron_iconset.dart
@@ -10,46 +10,7 @@ import 'package:web_components/web_components.dart';
import 'package:polymer_interop/polymer_interop.dart';
import 'iron_meta.dart';
-/// The `iron-iconset` element allows users to define their own icon sets.
-/// The `src` property specifies the url of the icon image. Multiple icons may
-/// be included in this image and they may be organized into rows.
-/// The `icons` property is a space separated list of names corresponding to the
-/// icons. The names must be ordered as the icons are ordered in the icon image.
-/// Icons are expected to be square and are the size specified by the `size`
-/// property. The `width` property corresponds to the width of the icon image
-/// and must be specified if icons are arranged into multiple rows in the image.
-///
-/// All `iron-iconset` elements are available for use by other `iron-iconset`
-/// elements via a database keyed by id. Typically, an element author that wants
-/// to support a set of custom icons uses a `iron-iconset` to retrieve
-/// and use another, user-defined iconset.
-///
-/// Example:
-///
-/// <iron-iconset id="my-icons" src="my-icons.png" width="96" size="24"
-/// icons="location place starta stopb bus car train walk">
-/// </iron-iconset>
-///
-/// This will automatically register the icon set "my-icons" to the iconset
-/// database. To use these icons from within another element, make a
-/// `iron-iconset` element and call the `byId` method to retrieve a
-/// given iconset. To apply a particular icon to an element, use the
-/// `applyIcon` method. For example:
-///
-/// iconset.applyIcon(iconNode, 'car');
-///
-/// Themed icon sets are also supported. The `iron-iconset` can contain child
-/// `property` elements that specify a theme with an offsetX and offsetY of the
-/// theme within the icon resource. For example.
-///
-/// <iron-iconset id="my-icons" src="my-icons.png" width="96" size="24"
-/// icons="location place starta stopb bus car train walk">
-/// <property theme="special" offsetX="256" offsetY="24"></property>
-/// </iron-iconset>
-///
-/// Then a themed icon can be applied like this:
-///
-/// iconset.applyIcon(iconNode, 'car', 'special');
+
@CustomElementProxy('iron-iconset')
class IronIconset extends HtmlElement with CustomElementProxyMixin, PolymerBase {
IronIconset.created() : super.created();
@@ -89,7 +50,7 @@ class IronIconset extends HtmlElement with CustomElementProxyMixin, PolymerBase
/// [icon]: The name or index of the icon to apply.
/// [theme]: (optional) The name or index of the icon to apply.
/// [scale]: (optional, defaults to 1) Icon scaling factor.
- applyIcon(Element element, icon, String theme, num scale) =>
+ applyIcon(Element element, icon, theme, scale) =>
jsElement.callMethod('applyIcon', [element, icon, theme, scale]);
/// Remove an icon from the given element by undoing the changes effected
« no previous file with comments | « lib/iron_icon.dart ('k') | lib/iron_iconset_svg.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698