From a56bc9d8f3f4b67f99bc60fe645d7ffde24fa508 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Sun, 23 Feb 2014 00:07:50 -0600 Subject: [PATCH] sideMenu: only update zIndex (change the dom) when you need to --- js/views/sideMenuView.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/js/views/sideMenuView.js b/js/views/sideMenuView.js index 07a7815041..7dc82e0421 100644 --- a/js/views/sideMenuView.js +++ b/js/views/sideMenuView.js @@ -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'; + } } });