summaryrefslogtreecommitdiffstats
path: root/assets
diff options
context:
space:
mode:
authorAndy Huang <ath@google.com>2013-03-13 18:29:57 -0700
committerAndy Huang <ath@google.com>2013-03-13 18:29:57 -0700
commit4821bbb4aeaf4393e45575e0e43c7086521039ad (patch)
treeafebeb2f183315da101979e7ca734c0338df667c /assets
parent8a396bea575d6a71a3a1ecb4e2df88c9a7158a67 (diff)
downloadandroid_packages_apps_UnifiedEmail-4821bbb4aeaf4393e45575e0e43c7086521039ad.tar.gz
android_packages_apps_UnifiedEmail-4821bbb4aeaf4393e45575e0e43c7086521039ad.tar.bz2
android_packages_apps_UnifiedEmail-4821bbb4aeaf4393e45575e0e43c7086521039ad.zip
don't re-apply the class-adding transforms
Reapplying them was causing them to sometimes be backed out upon image load, leading to text growing and shrinking several times. Bug: 7400516 Change-Id: I5543361fd0aa60e233c27f28d243fbf037cbe1da
Diffstat (limited to 'assets')
-rw-r--r--assets/script.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/assets/script.js b/assets/script.js
index 45df0f891..acbb12338 100644
--- a/assets/script.js
+++ b/assets/script.js
@@ -299,6 +299,9 @@ function addClassToElements(nodes, conditionFn, classToAdd, actionLog) {
for (i = 0, len = nodes.length; i < len; i++) {
node = nodes[i];
if (!conditionFn || conditionFn(node)) {
+ if (node.classList.contains(classToAdd)) {
+ continue;
+ }
node.classList.add(classToAdd);
added = true;
actionLog.push([node.classList.remove, node.classList, [classToAdd]]);