From ab2cfb1274190e3ef920eae136bf96e866c7d291 Mon Sep 17 00:00:00 2001 From: Yvonne Yip Date: Fri, 12 Jul 2013 12:33:02 +0100 Subject: [PATCH 01/42] polymer-animation: properties -> keyframes --- polymer-animation/index.html | 53 +++++++++----- .../polymer-animation-group.html | 23 ++---- .../polymer-animation-keyframe.html | 31 +++----- polymer-animation/polymer-animation-prop.html | 17 ++--- polymer-animation/polymer-animation.html | 71 ++++++++----------- polymer-animation/polymer-blink.html | 7 +- polymer-animation/polymer-bounce.html | 20 +++--- polymer-animation/polymer-fadein.html | 12 ++-- polymer-animation/polymer-fadeout.html | 9 +-- polymer-animation/polymer-flip.html | 39 +++++----- polymer-animation/polymer-shake.html | 41 +++++++---- 11 files changed, 159 insertions(+), 164 deletions(-) diff --git a/polymer-animation/index.html b/polymer-animation/index.html index eff2cdf..cd5f559 100644 --- a/polymer-animation/index.html +++ b/polymer-animation/index.html @@ -40,32 +40,53 @@
raw - - - - - + + + + + + + + + + + + raw group - - - - - + + + + + + + + + + + + - - - - - + + + + + + + + + + + + bounce shake - shake forever + flip X flip Y blink diff --git a/polymer-animation/polymer-animation-group.html b/polymer-animation/polymer-animation-group.html index d371787..a09e8a1 100644 --- a/polymer-animation/polymer-animation-group.html +++ b/polymer-animation/polymer-animation-group.html @@ -12,22 +12,6 @@ /** * Component for a group of animations. * - * A fade in and move animation in sequence: - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * * @class polymer-animation-group */ Polymer('polymer-animation-group', { @@ -55,6 +39,13 @@ makeAnimation: function() { return new ANIMATION_GROUPS[this.type](this.childAnimations, this.timingProps); }, + doOnChildren: function(inFn) { + var children = this.children; + if (!children.length) { + children = this.webkitShadowRoot ? this.webkitShadowRoot.childNodes : []; + } + Array.prototype.forEach.call(children, inFn, this); + }, completeApply: function() { this.doOnChildren(function(c) { c.completeApply(); diff --git a/polymer-animation/polymer-animation-keyframe.html b/polymer-animation/polymer-animation-keyframe.html index 56b9f58..f114cfe 100644 --- a/polymer-animation/polymer-animation-keyframe.html +++ b/polymer-animation/polymer-animation-keyframe.html @@ -1,39 +1,28 @@ diff --git a/polymer-animation/polymer-animation-prop.html b/polymer-animation/polymer-animation-prop.html index d67a889..892a57c 100644 --- a/polymer-animation/polymer-animation-prop.html +++ b/polymer-animation/polymer-animation-prop.html @@ -1,17 +1,9 @@ - + diff --git a/polymer-animation/polymer-animation.html b/polymer-animation/polymer-animation.html index 2e9ae28..9012f16 100644 --- a/polymer-animation/polymer-animation.html +++ b/polymer-animation/polymer-animation.html @@ -34,10 +34,14 @@ * A animation component to fade out an element: * * - * - * - * - * + * + * + * + * + * + * + * + * * * @class polymer-animation */ @@ -61,16 +65,12 @@ targetSelector: null, // animation /** - * Animation properties specified as a dictionary of - * :. For example, - * `{opacity: ['0','1']}` specifies animating the opacity - * from 0 to 1. - * The values must be strings. - * (https://github.com/web-animations/web-animations-js/issues/178) - * @property properties + * Animation keyframes specified as an array of dictionaries of + * : pairs. For example, + * @property keyframes * @type Object */ - properties: null, + keyframes: null, //accumulate: null, // not working in polyfill /** * The composition behavior. "replace", "add" or "merge". @@ -171,8 +171,8 @@ return this.animation; }, makeAnimation: function() { - //this.target && console.log('makeAnimation target', this.target, 'animation', this.animationProps, 'timing', this.timingProps); - return this.target ? new Animation(this.target, this.animationProps, this.timingProps) : null; + //this.target && console.log('makeAnimation target', this.target, 'animation', this.animationEffect, 'timing', this.timingProps); + return this.target ? new Animation(this.target, this.animationEffect, this.timingProps) : null; }, asyncApply: function() { this.cancelApply(); @@ -199,7 +199,7 @@ this.target = findTarget(this.targetSelector, this); } }, - propertiesChanged: function() { + keyframesChanged: function() { this.asyncApply(); }, compositeChanged: function() { @@ -226,13 +226,6 @@ autoplayChanged: function() { this.asyncApply(); }, - doOnChildren: function(inFn) { - var children = this.children; - if (!children.length) { - children = this.webkitShadowRoot ? this.webkitShadowRoot.childNodes : []; - } - Array.prototype.forEach.call(children, inFn, this); - }, get timingProps() { var props = {}; var timing = { @@ -241,7 +234,7 @@ startDelay: {isNumber: true}, iterationCount: {isNumber: true, allowInfinity: true}, direction: {}, - duration: {isNumber: true} + duration: {property: 'iterationDuration', isNumber: true} }; for (t in timing) { if (this[t] !== null) { @@ -249,32 +242,24 @@ props[name] = timing[t].isNumber ? toNumber(this[t], timing[t].allowInfinity) : this[t]; } } + console.log('timing', props); return props; }, - get animationProps() { + get animationEffect() { var props = {}; - if (!this.properties) { - this.doOnChildren(function(c) { - if (c.tagName && c.tagName.toLowerCase() === 'polymer-animation-prop') { - var property = c.name; - var values = []; - this.doOnChildren.call(c, function(f) { - values.push(f.properties); - }); - props[property] = values; - } + var frames = []; + if (!this.keyframes) { + var children = this.querySelectorAll('polymer-animation-keyframe'); + if (children.length === 0) { + children = this.shadowRoot.querySelectorAll('polymer-animation-keyframe'); + } + Array.prototype.forEach.call(children, function(c) { + frames.push(c.properties); }); } else { - for (k in this.properties) { - if (this.properties.hasOwnProperty(k)) { - props[k] = this.properties[k]; - } - } - } - if (this.composite) { - props.operation = this.composite; + frames = this.keyframes; } - return props; + return new KeyframeAnimationEffect(frames, this.composite); }, monitor: function() { // TODO(sorvell): adding brittle support for an end event diff --git a/polymer-animation/polymer-blink.html b/polymer-animation/polymer-blink.html index b7c348b..61fcda9 100644 --- a/polymer-animation/polymer-blink.html +++ b/polymer-animation/polymer-blink.html @@ -6,9 +6,10 @@ duration: 0.7, iterationCount: 'Infinity', easing: 'cubic-bezier(1.0,0,0,1.0)', - properties: { - opacity: ["1","0"] - } + keyframes: [ + {opacity: 1}, + {opacity: 0} + ] }); diff --git a/polymer-animation/polymer-bounce.html b/polymer-animation/polymer-bounce.html index 58d2d7c..9a24ad7 100644 --- a/polymer-animation/polymer-bounce.html +++ b/polymer-animation/polymer-bounce.html @@ -14,17 +14,15 @@ }, generate: function() { var parsed = this.magnitude.match(/([\-0-9]+)(.*)/); - this.properties = { - transform: [ - {offset: 0, value: 'translateY(0)'}, - {offset: 0.2, value: 'translateY(0)'}, - {offset: 0.4, value: 'translateY(' + this.magnitude + ')'}, - {offset: 0.5, value: 'translateY(0)'}, - {offset: 0.6, value:'translateY(' + Number(parsed[1]) / 2 + parsed[2] + ')'}, - {offset: 0.8, value: 'translateY(0)'}, - {offset: 1, value: 'translateY(0)'} - ] - }; + this.keyframes = [ + {offset: 0, transform: 'translateY(0)'}, + {offset: 0.2, transform: 'translateY(0)'}, + {offset: 0.4, transform: 'translateY(' + this.magnitude + ')'}, + {offset: 0.5, transform: 'translateY(0)'}, + {offset: 0.6, transform:'translateY(' + Number(parsed[1]) / 2 + parsed[2] + ')'}, + {offset: 0.8, transform: 'translateY(0)'}, + {offset: 1, transform: 'translateY(0)'} + ]; } }); diff --git a/polymer-animation/polymer-fadein.html b/polymer-animation/polymer-fadein.html index 50f09ac..9c68bea 100644 --- a/polymer-animation/polymer-fadein.html +++ b/polymer-animation/polymer-fadein.html @@ -1,10 +1,14 @@ diff --git a/polymer-animation/polymer-flip.html b/polymer-animation/polymer-flip.html index fdd91df..b1613c7 100644 --- a/polymer-animation/polymer-flip.html +++ b/polymer-animation/polymer-flip.html @@ -17,29 +17,22 @@ var isY = this.axis === 'y' || this.axis === 'Y'; var rotate = isY ? 'rotateY' : 'rotateX'; var transZ = isY ? '150px' : '50px'; - this.properties = { - transform: [{ - easing: 'ease-out', - offset: 0, - value: 'perspective(400px) translateZ(0px) ' + rotate + '(0deg) scale(1)' - }, { - easing: 'ease-out', - offset: 0.4, - value: 'perspective(400px) translateZ(' + transZ + ') ' + rotate + '(170deg) scale(1)' - }, { - easing: 'ease-in', - offset: 0.5, - value: 'perspective(400px) translateZ(' + transZ + ') ' + rotate + '(190deg) scale(1)' - }, { - easing: 'ease-in', - offset: 0.8, - value: 'perspective(400px) translateZ(0px) ' + rotate + '(360deg) scale(.95)' - }, { - easing: 'ease-in', - offset: 1, - value: 'perspective(400px) translateZ(0px) ' + rotate + '(360deg) scale(1)' - }] - } + this.keyframes = [{ + offset: 0, + transform: 'perspective(400px) translateZ(0px) ' + rotate + '(0deg) scale(1)' + }, { + offset: 0.4, + transform: 'perspective(400px) translateZ(' + transZ + ') ' + rotate + '(170deg) scale(1)' + }, { + offset: 0.5, + transform: 'perspective(400px) translateZ(' + transZ + ') ' + rotate + '(190deg) scale(1)' + }, { + offset: 0.8, + transform: 'perspective(400px) translateZ(0px) ' + rotate + '(360deg) scale(.95)' + }, { + offset: 1, + transform: 'perspective(400px) translateZ(0px) ' + rotate + '(360deg) scale(1)' + }]; } }); diff --git a/polymer-animation/polymer-shake.html b/polymer-animation/polymer-shake.html index 208d0af..8201f2b 100644 --- a/polymer-animation/polymer-shake.html +++ b/polymer-animation/polymer-shake.html @@ -2,23 +2,38 @@ From b71cfc69163cece2a8ba2c690d4ebbff2ae75d77 Mon Sep 17 00:00:00 2001 From: Eric Bidelman Date: Fri, 12 Jul 2013 12:50:28 -0700 Subject: [PATCH 02/42] Setting .responseType needs to come after open --- polymer-ajax/polymer-xhr.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polymer-ajax/polymer-xhr.html b/polymer-ajax/polymer-xhr.html index 90d058e..2ae9d3c 100644 --- a/polymer-ajax/polymer-xhr.html +++ b/polymer-ajax/polymer-xhr.html @@ -79,10 +79,10 @@ if (params && method == 'GET') { url += (url.indexOf('?') > 0 ? '&' : '?') + params; } + xhr.open(method, url, async); if (options.responseType) { xhr.responseType = options.responseType; } - xhr.open(method, url, async); this.makeReadyStateHandler(xhr, options.callback); this.setRequestHeaders(options.headers); xhr.send(method == 'POST' ? (options.body || params) : null); From a3a4b84d9c8c74d5ee566f0a5fcd2dcbe0899093 Mon Sep 17 00:00:00 2001 From: frankiefu Date: Fri, 12 Jul 2013 14:08:43 -0700 Subject: [PATCH 03/42] adjust transition duration from 0.5 to 0.33 --- polymer-collapse/polymer-collapse.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polymer-collapse/polymer-collapse.html b/polymer-collapse/polymer-collapse.html index 46478ba..fc3d85d 100644 --- a/polymer-collapse/polymer-collapse.html +++ b/polymer-collapse/polymer-collapse.html @@ -78,7 +78,7 @@ * @type number * @default 0.5 */ - duration: 0.5, + duration: 0.33, /** * If true, the size of the target element is fixed and is set * on the element. Otherwise it will try to From 22498e9f02b68edaa724d98607ac150467d20829 Mon Sep 17 00:00:00 2001 From: "Scott J. Miles" Date: Fri, 12 Jul 2013 12:03:03 -0700 Subject: [PATCH 04/42] allow 'flex' as well as 'fit' --- polymer-layout/polymer-layout.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polymer-layout/polymer-layout.html b/polymer-layout/polymer-layout.html index 0860d65..5b55a2a 100644 --- a/polymer-layout/polymer-layout.html +++ b/polymer-layout/polymer-layout.html @@ -63,7 +63,7 @@ w: c.offsetWidth, h: c.offsetHeight }; - if (!c.hasAttribute('fit')) { + if (!c.hasAttribute('fit') && !c.hasAttribute('flex')) { ww += c.offsetWidth; hh += c.offsetHeight; list.push(info); From 3629cabbd89c43700003fd1820131cfa319eb6cf Mon Sep 17 00:00:00 2001 From: "Scott J. Miles" Date: Fri, 12 Jul 2013 18:01:57 -0700 Subject: [PATCH 05/42] new polymer-elements --- polymer-grid-layout/index.html | 81 +++++++ polymer-grid-layout/polymer-grid-layout.html | 242 +++++++++++++++++++ polymer-shared-lib/index.html | 23 ++ polymer-shared-lib/polymer-shared-lib.html | 89 +++++++ 4 files changed, 435 insertions(+) create mode 100644 polymer-grid-layout/index.html create mode 100644 polymer-grid-layout/polymer-grid-layout.html create mode 100644 polymer-shared-lib/index.html create mode 100644 polymer-shared-lib/polymer-shared-lib.html diff --git a/polymer-grid-layout/index.html b/polymer-grid-layout/index.html new file mode 100644 index 0000000..6c6d26c --- /dev/null +++ b/polymer-grid-layout/index.html @@ -0,0 +1,81 @@ + + + + polymer-grid-layout example + + + + + + + + + + + + + diff --git a/polymer-grid-layout/polymer-grid-layout.html b/polymer-grid-layout/polymer-grid-layout.html new file mode 100644 index 0000000..e3f9501 --- /dev/null +++ b/polymer-grid-layout/polymer-grid-layout.html @@ -0,0 +1,242 @@ + + + + \ No newline at end of file diff --git a/polymer-shared-lib/index.html b/polymer-shared-lib/index.html new file mode 100644 index 0000000..532829b --- /dev/null +++ b/polymer-shared-lib/index.html @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + diff --git a/polymer-shared-lib/polymer-shared-lib.html b/polymer-shared-lib/polymer-shared-lib.html new file mode 100644 index 0000000..81c50e7 --- /dev/null +++ b/polymer-shared-lib/polymer-shared-lib.html @@ -0,0 +1,89 @@ + + + + From 62d82e800cd072102a1f3e1162d8c248a2a6f6a3 Mon Sep 17 00:00:00 2001 From: "Scott J. Miles" Date: Sat, 13 Jul 2013 12:06:15 -0700 Subject: [PATCH 06/42] fix path to polymer.js --- polymer-grid-layout/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polymer-grid-layout/index.html b/polymer-grid-layout/index.html index 6c6d26c..010f7a6 100644 --- a/polymer-grid-layout/index.html +++ b/polymer-grid-layout/index.html @@ -2,7 +2,7 @@ polymer-grid-layout example - + - + +
Item 0
Item 1
Item 2
Item 3
Item 4
-
Item 5

Multi-select

- + +
Item 0
Item 1
Item 2
Item 3
Item 4
-
Item 5
+ + diff --git a/polymer-selector/polymer-selector.html b/polymer-selector/polymer-selector.html index 4018fd6..8dd1d98 100644 --- a/polymer-selector/polymer-selector.html +++ b/polymer-selector/polymer-selector.html @@ -9,13 +9,13 @@ */ /** * polymer-selector is used to display a list of elements that can be selected. - * The attribute "selected" indicates which element is being selected. - * Tapping on the element to change selection would fire "polymer-activate" - * event. + * The attribute "selected" indicates which item element is being selected. + * Tapping on the item element would fire "polymer-activate" event. And use + * "polymer-select" event to listen for selection changes. * * Example: * - * + * *
Item 1
*
Item 2
*
Item 3
@@ -39,11 +39,19 @@ * @class polymer-selector */ /** - * Fired when an element is selected via tap. + * Fired when selection changes. * - * @event activate + * @event polymer-select * @param {Object} detail - * @param {Object} detail.item the selected element + * @param {boolean} isSelected + * @param {Object} detail.item the item element + */ +/** + * Fired when an item element is tapped. + * + * @event polymer-activate + * @param {Object} detail + * @param {Object} detail.item the item element */ --> @@ -57,10 +65,10 @@ +
Hi I'm some content
- - + +

Title

-
- + +
Main content
Sidebar content
-
+
Some more stuffs...
- + Footer - -
+ +
A last bit, like a panel
@@ -117,13 +118,13 @@

Title

-

Using CSS class from polymer-flex-layout.css

+

polymer-flex-layout.css


-

polymer-flex-layout as a flexbox container

+

polymer-flex-panel element


-

Using polymer-flex-layout to add flexbox behavior to the parent node

+

polymer-flex-layout element

diff --git a/polymer-flex-layout/polymer-flex-layout.css b/polymer-flex-layout/polymer-flex-layout.css index 6b41a08..6d0c177 100644 --- a/polymer-flex-layout/polymer-flex-layout.css +++ b/polymer-flex-layout/polymer-flex-layout.css @@ -1,3 +1,8 @@ +/* +Copyright 2013 The Polymer Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. +*/ .flexbox { display: -webkit-box !important; display: -ms-flexbox !important; diff --git a/polymer-flex-layout/polymer-flex-panel.html b/polymer-flex-layout/polymer-flex-panel.html new file mode 100644 index 0000000..6e1d4e2 --- /dev/null +++ b/polymer-flex-layout/polymer-flex-panel.html @@ -0,0 +1,10 @@ + + + + From b3d6b99293d568c4d9b6a2b4afb85185e009b3a9 Mon Sep 17 00:00:00 2001 From: frankiefu Date: Tue, 16 Jul 2013 10:51:11 -0700 Subject: [PATCH 10/42] remove listeners correctly --- polymer-collapse/polymer-collapse.html | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/polymer-collapse/polymer-collapse.html b/polymer-collapse/polymer-collapse.html index fc3d85d..eecfbc7 100644 --- a/polymer-collapse/polymer-collapse.html +++ b/polymer-collapse/polymer-collapse.html @@ -8,7 +8,9 @@ * @module Polymer Elements */ /** - * polymer-collapse is used to add collapsible behavior to another element. + * polymer-collapse is used to add collapsible behavior to the + * target element. It adjusts the height or width of the target element + * to make the element collapse and expand. * * Example: * @@ -76,7 +78,7 @@ * * @attribute duration * @type number - * @default 0.5 + * @default 0.33 */ duration: 0.33, /** @@ -114,12 +116,14 @@ } }, addListeners: function(node) { - node.addEventListener('webkitTransitionEnd', this.transitionEnd.bind(this)); - node.addEventListener('transitionend', this.transitionEnd.bind(this)); + this.transitionEndListener = this.transitionEndListener || + this.transitionEnd.bind(this); + node.addEventListener('webkitTransitionEnd', this.transitionEndListener); + node.addEventListener('transitionend', this.transitionEndListener); }, removeListeners: function(node) { - node.removeEventListener('webkitTransitionEnd', this.transitionEnd.bind(this)); - node.removeEventListener('transitionend', this.transitionEnd.bind(this)); + node.removeEventListener('webkitTransitionEnd', this.transitionEndListener); + node.removeEventListener('transitionend', this.transitionEndListener); }, horizontalChanged: function() { this.dimension = this.horizontal ? 'width' : 'height'; @@ -132,7 +136,8 @@ }, setTransitionDuration: function(duration) { var s = this.target.style; - s.webkitTransition = s.transition = duration ? (this.dimension + ' ' + duration + 's') : null; + s.webkitTransition = s.transition = duration ? + (this.dimension + ' ' + duration + 's') : null; if (duration === 0) { this.asyncMethod('transitionEnd'); } From 2b27a61287a67157478cc229ac14dac0ae8e13df Mon Sep 17 00:00:00 2001 From: frankiefu Date: Tue, 16 Jul 2013 14:38:48 -0700 Subject: [PATCH 11/42] add test for multi-selection in polymer-selector --- .../html/polymer-selector-activate-event.html | 5 ++ test/html/polymer-selector-basic.html | 11 ++++ test/html/polymer-selector-multi.html | 53 +++++++++++++++++++ test/js/polymer-selector.js | 1 + 4 files changed, 70 insertions(+) create mode 100644 test/html/polymer-selector-multi.html diff --git a/test/html/polymer-selector-activate-event.html b/test/html/polymer-selector-activate-event.html index a2b099c..6184095 100644 --- a/test/html/polymer-selector-activate-event.html +++ b/test/html/polymer-selector-activate-event.html @@ -6,6 +6,11 @@ + diff --git a/test/html/polymer-selector-basic.html b/test/html/polymer-selector-basic.html index f995573..b12dcf5 100644 --- a/test/html/polymer-selector-basic.html +++ b/test/html/polymer-selector-basic.html @@ -6,6 +6,15 @@ + @@ -17,6 +26,8 @@
Item 5
+

+
Item 1
Item 2
diff --git a/test/html/polymer-selector-multi.html b/test/html/polymer-selector-multi.html new file mode 100644 index 0000000..066fb88 --- /dev/null +++ b/test/html/polymer-selector-multi.html @@ -0,0 +1,53 @@ + + + + polymer-selector-multi + + + + + + + + + +
Item 1
+
Item 2
+
Item 3
+
Item 4
+
Item 5
+
+ + + + diff --git a/test/js/polymer-selector.js b/test/js/polymer-selector.js index fbbc048..537fa39 100644 --- a/test/js/polymer-selector.js +++ b/test/js/polymer-selector.js @@ -7,4 +7,5 @@ htmlSuite('polymer-selector', function() { htmlTest('html/polymer-selector-basic.html'); htmlTest('html/polymer-selector-activate-event.html'); + htmlTest('html/polymer-selector-multi.html'); }); \ No newline at end of file From a3c8a99cdca4d95664049c4759204ecea95f9251 Mon Sep 17 00:00:00 2001 From: "Scott J. Miles" Date: Wed, 17 Jul 2013 12:41:32 -0700 Subject: [PATCH 12/42] add gruntfile for building docs, and manifest.xml for discovery --- .gitignore | 1 + gruntfile.js | 35 ++++++ manifest.xml | 22 ++++ polymer-file/polymer-file.html | 35 +++--- polymer-grid-layout/polymer-grid-layout.html | 56 ++++++--- polymer-selector/polymer-selector.html | 118 ++++--------------- 6 files changed, 144 insertions(+), 123 deletions(-) create mode 100644 gruntfile.js create mode 100644 manifest.xml diff --git a/.gitignore b/.gitignore index 07e6e47..7a42667 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /node_modules +/docs diff --git a/gruntfile.js b/gruntfile.js new file mode 100644 index 0000000..2c12c35 --- /dev/null +++ b/gruntfile.js @@ -0,0 +1,35 @@ +/* + * Copyright 2013 The Polymer Authors. All rights reserved. + * Use of this source code is governed by a BSD-style + * license that can be found in the LICENSE file. + */ +module.exports = function(grunt) { + grunt.initConfig({ + yuidoc: { + compile: { + name: '<%= pkg.name %>', + description: '<%= pkg.description %>', + version: '<%= pkg.version %>', + url: '<%= pkg.homepage %>', + options: { + exclude: 'third_party', + extension: '.js,.html', + paths: '.', + outdir: 'docs', + linkNatives: 'true', + tabtospace: 2, + themedir: '../docs/doc_themes/footstrap' + } + } + }, + pkg: grunt.file.readJSON('package.json') + }); + + // plugins + grunt.loadNpmTasks('grunt-contrib-yuidoc'); + + // tasks + grunt.registerTask('default', ['yuidoc']); + grunt.registerTask('docs', ['yuidoc']); +}; + diff --git a/manifest.xml b/manifest.xml new file mode 100644 index 0000000..e821eaf --- /dev/null +++ b/manifest.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/polymer-file/polymer-file.html b/polymer-file/polymer-file.html index 94590d3..6ecb17d 100644 --- a/polymer-file/polymer-file.html +++ b/polymer-file/polymer-file.html @@ -10,14 +10,12 @@ */ /** - * @class polymer-file - * * polymer-file provides File API operations. * * Examples: * * + * on-polymer-result="handleResult"> * ... * this.$.file.blob = new Blob(['abc', {type: 'text/plain'}]); * this.$.file.read(); @@ -28,21 +26,24 @@ * result="{{result}}"> * ... * this.$.file.blob = new Blob(['abc', {type: 'text/plain'}]); + * + * @class polymer-file + */ +/** + * Fired when a file read has complete. + * + * @event polymer-result + * @param {Object} detail + * @param {Object} detail.result The result of the read. + */ +/** + * Fired if there is an error in the file read. + * + * @event polymer-error + * @param {Object} detail + * @param {Object} detail.error Information on the error. + * */ - /** - * Fired when a file read has complete. - * - * @event polymer-result - * @param {Object} detail - * @param {Object} detail.result The result of the read. - */ - /** - * Fired if there is an error in the file read. - * - * @event polymer-error - * @param {Object} detail - * @param {Object} detail.error Information on the error. - */ -->