sideMenu: only update zIndex (change the dom) when you need to

This commit is contained in:
Adam Bradley
2014-02-23 00:07:50 -06:00
parent 977c1cc6e5
commit a56bc9d8f3

View File

@@ -24,10 +24,14 @@
this.isEnabled = isEnabled;
},
bringUp: function() {
this.el.style.zIndex = 0;
if(this.el.style.zIndex !== '0') {
this.el.style.zIndex = '0';
}
},
pushDown: function() {
this.el.style.zIndex = -1;
if(this.el.style.zIndex !== '-1') {
this.el.style.zIndex = '-1';
}
}
});