Skip to content
This repository was archived by the owner on Dec 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6 from jklein24/master
Browse files Browse the repository at this point in the history
A bunch of type fixes caught by the JSCompiler
  • Loading branch information
cdata committed May 4, 2015
2 parents a094802 + df3570d commit 6b56de5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion iron-multi-selectable.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
* `value` will be toggled; otherwise the `value` will be selected.
*
* @method select
* @param {String} value the value to select.
* @param {string} value the value to select.
*/
select: function(value) {
if (this.multi) {
Expand Down
16 changes: 8 additions & 8 deletions iron-selectable.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* set this to the name of the attribute.
*
* @attribute attrForSelected
* @type String
* @type {string}
*/
attrForSelected: {
type: String,
Expand All @@ -32,7 +32,7 @@
* Gets or sets the selected element. The default is to use the index of the item.
*
* @attribute selected
* @type String
* @type {string}
*/
selected: {
type: String,
Expand All @@ -43,7 +43,7 @@
* Returns the currently selected item.
*
* @attribute selectedItem
* @type Object
* @type {Object}
*/
selectedItem: {
type: Object,
Expand All @@ -57,7 +57,7 @@
* Set to empty string to listen to no events.
*
* @attribute activateEvent
* @type String
* @type {string}
* @default 'click'
*/
activateEvent: {
Expand All @@ -71,15 +71,15 @@
* are selectable.
*
* @attribute selectable
* @type String
* @type {string}
*/
selectable: String,

/**
* The class to set on elements when selected.
*
* @attribute selectedClass
* @type String
* @type {string}
*/
selectedClass: {
type: String,
Expand All @@ -90,7 +90,7 @@
* The attribute to set on elements when selected.
*
* @attribute selectedAttribute
* @type String
* @type {string}
*/
selectedAttribute: {
type: String,
Expand Down Expand Up @@ -154,7 +154,7 @@
* Selects the given value.
*
* @method select
* @param {String} value the value to select.
* @param {string} value the value to select.
*/
select: function(value) {
this.selected = value;
Expand Down
14 changes: 9 additions & 5 deletions iron-selection.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

<script>

/**
* @param {!Function} selectCallback
* @constructor
*/
Polymer.IronSelection = function(selectCallback) {
this.selection = [];
this.selectCallback = selectCallback;
Expand Down Expand Up @@ -49,7 +53,7 @@
* Indicates if a given item is selected.
*
* @method isSelected
* @param {any} item The item whose selection state should be checked.
* @param {*} item The item whose selection state should be checked.
* @returns Returns true if `item` is selected.
*/
isSelected: function(item) {
Expand All @@ -60,8 +64,8 @@
* Sets the selection state for a given item to either selected or deselected.
*
* @method setItemSelected
* @param {any} item The item to select.
* @param {Boolean} isSelected True for selected, false for deselected.
* @param {*} item The item to select.
* @param {boolean} isSelected True for selected, false for deselected.
*/
setItemSelected: function(item, isSelected) {
if (item != null) {
Expand All @@ -85,7 +89,7 @@
* the `item` will be selected.
*
* @method select
* @param {any} item The item to select.
* @param {*} item The item to select.
*/
select: function(item) {
if (this.multi) {
Expand All @@ -100,7 +104,7 @@
* Toggles the selection state for `item`.
*
* @method toggle
* @param {any} item The item to toggle.
* @param {*} item The item to toggle.
*/
toggle: function(item) {
this.setItemSelected(item, !this.isSelected(item));
Expand Down

0 comments on commit 6b56de5

Please sign in to comment.