diff options
author | Phil Hughes <me@iamphill.com> | 2017-08-02 10:46:25 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-08-02 10:46:25 +0300 |
commit | e67c4a6d913ccdb4615639cb317634141da2a37b (patch) | |
tree | 7c9c38c90ce4e211f175385b9fcdff6c1dc369ae /app/assets/javascripts/fly_out_nav.js | |
parent | b808fdf16b4799e0d2e5b41d70d04f6dd10c040d (diff) |
changed variable names
Diffstat (limited to 'app/assets/javascripts/fly_out_nav.js')
-rw-r--r-- | app/assets/javascripts/fly_out_nav.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/app/assets/javascripts/fly_out_nav.js b/app/assets/javascripts/fly_out_nav.js index ae04826896b..3f64c16a79d 100644 --- a/app/assets/javascripts/fly_out_nav.js +++ b/app/assets/javascripts/fly_out_nav.js @@ -7,32 +7,32 @@ export const calculateTop = (boundingRect, outerHeight) => { }; export const showSubLevelItems = (el) => { - const $subitems = el.querySelector('.sidebar-sub-level-items'); + const subItems = el.querySelector('.sidebar-sub-level-items'); - if (!$subitems) return; + if (!subItems) return; - $subitems.style.display = 'block'; + subItems.style.display = 'block'; el.classList.add('is-over'); const boundingRect = el.getBoundingClientRect(); - const top = calculateTop(boundingRect, $subitems.offsetHeight); + const top = calculateTop(boundingRect, subItems.offsetHeight); const isAbove = top < boundingRect.top; - $subitems.style.transform = `translate3d(0, ${Math.floor(top)}px, 0)`; + subItems.style.transform = `translate3d(0, ${Math.floor(top)}px, 0)`; if (isAbove) { - $subitems.classList.add('is-above'); + subItems.classList.add('is-above'); } }; export const hideSubLevelItems = (el) => { - const $subitems = el.querySelector('.sidebar-sub-level-items'); + const subItems = el.querySelector('.sidebar-sub-level-items'); - if (!$subitems) return; + if (!subItems) return; el.classList.remove('is-over'); - $subitems.style.display = 'none'; - $subitems.classList.remove('is-above'); + subItems.style.display = 'none'; + subItems.classList.remove('is-above'); }; export default () => { |