From 4e3f1c67b22e1b0aef7d14a23a244636f2ce8b92 Mon Sep 17 00:00:00 2001 From: flyingL123 Date: Mon, 2 May 2016 22:47:55 -0400 Subject: [PATCH] Account for barOffset Account for barOffset value when setting active menu item --- js/foundation.magellan.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/foundation.magellan.js b/js/foundation.magellan.js index ff95dc0665..64b264c71d 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; }