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

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiefu committed Aug 29, 2013
1 parent 2d70777 commit c4bff26
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 5 deletions.
5 changes: 5 additions & 0 deletions polymer-collapse/polymer-collapse.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@
closedChanged: function() {
this.asyncUpdate();
},
/**
* Toggle the closed state of the collapsible.
*
* @method toggle
*/
toggle: function() {
this.closed = !this.closed;
},
Expand Down
30 changes: 26 additions & 4 deletions polymer-flex-layout/polymer-flex-layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,40 @@
*
* <div>
* <polymer-flex-layout></polymer-flex-layout>
* <div>Left sidebar</div>
* <div flex>Main content</div>
* <div>Right sidebar</div>
* <div>Left</div>
* <div flex>Main</div>
* <div>Right</div>
* </div>
*
* ---------------------------------
* |-------------------------------|
* ||Left| Main |Right||
* |-------------------------------|
* ---------------------------------
*
* <div>
* <polymer-flex-layout></polymer-flex-layout vertical>
* <polymer-flex-layout vertical></polymer-flex-layout>
* <div>Header</div>
* <div flex>Body</div>
* <div>Footer</div>
* </div>
*
* ----------
* ||------||
* ||Header||
* ||------||
* ||Body ||
* || ||
* || ||
* || ||
* || ||
* || ||
* || ||
* ||------||
* ||Footer||
* ||------||
* ----------
*
* @class polymer-flex-layout
*/
/**
Expand Down
10 changes: 10 additions & 0 deletions polymer-localstorage/polymer-localstorage.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
*
* @class polymer-localstorage
*/
/**
* Fired after it is loaded from localStorage.
*
* @event polymer-localstorage-load
*/
-->
<polymer-element name="polymer-localstorage" attributes="name value useRaw">
<template>
Expand Down Expand Up @@ -81,6 +86,11 @@
this.loaded = true;
this.asyncFire('polymer-localstorage-load');
},
/**
* Saves the value to localStorage.
*
* @method save
*/
save: function() {
window.localStorage.setItem(this.name,
this.useRaw ? this.value : JSON.stringify(this.value));
Expand Down
31 changes: 30 additions & 1 deletion polymer-selector/polymer-selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
/**
* polymer-selector is used to manage a list of elements that can be selected.
* The attribute "selected" indicates which item element is being selected.
* The attribute "multi" indicates if multiple items can be selected at once.
* Tapping on the item element would fire "polymer-activate" event. Use
* "polymer-select" event to listen for selection changes.
*
Expand Down Expand Up @@ -39,7 +40,9 @@
* @class polymer-selector
*/
/**
* Fired when selection changes.
* Fired when an item's selection state is changed. This event is fired both
* when an item is selected or deselected. The `isSelected` detail property
* contains the selection state.
*
* @event polymer-select
* @param {Object} detail
Expand Down Expand Up @@ -156,7 +159,33 @@
* @default null
*/
target: null,
/**
* This can be used to query nodes from the target node to be used for
* selection items. Note this only works if the 'target' property is set.
*
* Example:
*
* <polymer-selector target="{{$.myForm}}" itemsSelector="input[type=radio]"></polymer-selector>
* <form id="myForm">
* <label><input type="radio" name="color" value="red"> Red</label> <br>
* <label><input type="radio" name="color" value="green"> Green</label> <br>
* <label><input type="radio" name="color" value="blue"> Blue</label> <br>
* <p>color = {{color}}</p>
* </form>
*
* @attribute itemSelector
* @type string
* @default ''
*/
itemsSelector: '',
/**
* The event that would be fired from the item element to indicate
* it is being selected.
*
* @attribute activateEvent
* @type string
* @default 'tap'
*/
activateEvent: 'tap',
notap: false,
created: function() {
Expand Down

0 comments on commit c4bff26

Please sign in to comment.