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

Unified Diff: third_party/polymer/v1_0/components-chromium/neon-animation/animations/cascaded-animation-extracted.js

Issue 1221923003: Update bower.json for Polymer elements and add PRESUBMIT.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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
Index: third_party/polymer/v1_0/components-chromium/neon-animation/animations/cascaded-animation-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/neon-animation/animations/cascaded-animation-extracted.js b/third_party/polymer/v1_0/components-chromium/neon-animation/animations/cascaded-animation-extracted.js
index 7cdb9760afd097614b38aaa147ebc6fb63f85420..d2761228b173d9be27ddceb06340157b33e95f17 100644
--- a/third_party/polymer/v1_0/components-chromium/neon-animation/animations/cascaded-animation-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/neon-animation/animations/cascaded-animation-extracted.js
@@ -10,6 +10,7 @@
properties: {
+ /** @type {!Polymer.IronMeta} */
_animationMeta: {
type: Object,
value: function() {
@@ -19,13 +20,23 @@
},
+ /**
+ * @param {{
+ * animation: string,
+ * nodes: !Array<!Element>,
+ * nodeDelay: (number|undefined),
+ * timing: (Object|undefined)
+ * }} config
+ */
configure: function(config) {
- var animationConstructor = this._animationMeta.byKey(config.animation);
+ var animationConstructor = /** @type {Function} */ (
+ this._animationMeta.byKey(config.animation));
if (!animationConstructor) {
console.warn(this.is + ':', 'constructor for', config.animation, 'not found!');
return;
}
+ this._animations = [];
var nodes = config.nodes;
var effects = [];
var nodeDelay = config.nodeDelay || 50;
@@ -41,12 +52,19 @@
var animation = new animationConstructor();
var effect = animation.configure(config);
+ this._animations.push(animation);
effects.push(effect);
}
config.timing.delay = oldDelay;
this._effect = new GroupEffect(effects);
return this._effect;
+ },
+
+ complete: function() {
+ for (var animation, index = 0; animation = this._animations[index]; index++) {
+ animation.complete(animation.config);
+ }
}
});

Powered by Google App Engine
This is Rietveld 408576698