diff --git a/polymer-ui-icon/polymer-ui-icon.html b/polymer-ui-icon/polymer-ui-icon.html
index 1aa2420..5309863 100644
--- a/polymer-ui-icon/polymer-ui-icon.html
+++ b/polymer-ui-icon/polymer-ui-icon.html
@@ -1,9 +1,9 @@
-
+
+
@@ -136,25 +137,20 @@
this.updateIcon();
},
themeChanged: function(old) {
+ this.super(arguments);
this.style.backgroundPosition = '';
- this.classList.switch(old, this.theme);
this.bx = calcThemeOffset(this.theme, this);
- this.asyncMethod('updateIcon');
+ this.updateIcon();
},
updateIcon: function() {
if (this.src) {
this.style.backgroundPosition = 'center';
} else {
- // TODO(sorvell): FF cannot set Y only so we go to trouble
- // to find the x offset and use it here.
this.style.backgroundPosition = (this.bx + 'px') + ' ' + (this.by + 'px');
- //this.style.backgroundPositionY = this.by + 'px';
}
}
});
-
- // memoize offset by theme name since getComputedStyle
- // is $$
+ // memoize offset because getComputedStyle is expensive
var themes = {};
function calcThemeOffset(theme, node) {
if (themes[theme] === undefined) {