From bc3990492b60d3c55392ee1c1596a2b012099fd4 Mon Sep 17 00:00:00 2001 From: Yvonne Yip Date: Thu, 12 Dec 2013 14:34:05 -0800 Subject: [PATCH] polymer-animation: hack to allow selecting animated elements from the outside --- polymer-animation.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/polymer-animation.html b/polymer-animation.html index bedcbce..faad269 100644 --- a/polymer-animation.html +++ b/polymer-animation.html @@ -203,6 +203,8 @@ return this.animation; }, makeSingleAnimation: function(target) { + // XXX(yvonne): for selecting all the animated elements. + target.classList.add('polymer-animation-target'); return new Animation(target, this.animationEffect, this.timingProps); }, makeAnimation: function() { @@ -233,6 +235,11 @@ this.target = findTarget(this.targetSelector, this); } }, + targetChanged: function(old) { + if (old) { + old.classList.remove('polymer-animation-target'); + } + }, get timingProps() { var props = {}; var timing = {