From: flyingL123 Date: Tue, 3 May 2016 02:47:55 +0000 (-0400) Subject: Account for barOffset X-Git-Tag: v6.2.2-rc1~25^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e3f1c67b22e1b0aef7d14a23a244636f2ce8b92;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Account for barOffset Account for barOffset value when setting active menu item --- diff --git a/js/foundation.magellan.js b/js/foundation.magellan.js index ff95dc066..64b264c71 100644 --- a/js/foundation.magellan.js +++ b/js/foundation.magellan.js @@ -133,7 +133,7 @@ class Magellan { var isDown = this.scrollPos < winPos, _this = this, curVisible = this.points.filter(function(p, i){ - return isDown ? p <= winPos : p - _this.options.threshold <= winPos;//&& winPos >= _this.points[i -1] - _this.options.threshold; + return isDown ? p - _this.options.barOffset <= winPos : p - _this.options.barOffset - _this.options.threshold <= winPos; }); curIdx = curVisible.length ? curVisible.length - 1 : 0; }