From 108cec7938a5725b0b194ca6e0cdfe9e4b829232 Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Thu, 13 Dec 2018 18:38:42 +0000 Subject: [PATCH] Remove fixedTop property from sticky elements It's no longer used by this code. --- app/assets/javascripts/stick-to-window-when-scrolling.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/app/assets/javascripts/stick-to-window-when-scrolling.js b/app/assets/javascripts/stick-to-window-when-scrolling.js index db3314e83..7d1e0907e 100644 --- a/app/assets/javascripts/stick-to-window-when-scrolling.js +++ b/app/assets/javascripts/stick-to-window-when-scrolling.js @@ -119,7 +119,6 @@ } }; - this.setFixedTop(el); this.setElWidth(el); this.setElHeight(el, onHeightSet); }; @@ -131,14 +130,6 @@ }); self.setElementPositions(); }; - Sticky.prototype.setFixedTop = function (el) { - var $siblingEl = $('
'); - $siblingEl.insertBefore(el.$fixedEl); - var fixedTop = $siblingEl.offset().top - $siblingEl.position().top; - $siblingEl.remove(); - - el.fixedTop = fixedTop; - }; Sticky.prototype.setElWidth = function (el) { el.horizontalSpace = el.$fixedEl.outerWidth(true); };