The most advanced responsive front-end framework in the world. Quickly create prototypes and production code for sites that work on any kind of device.
If Magellan is applied using the barOffset option, the _updateActive() method does not account for this value when setting the active menu item. This is particularly noticeable when using a sticky menu because if you click on a menu item, you are scrolled to the appropriate section, but the menu item before the selected one will get the active class instead of the menu item for the section you just scrolled to. This results in an odd user experience.
I believe it's a one-line fix, and it's working for me, so unless there are some other consequences, it should be an easy update.
Line 136 needs to be changed from:
return isDown ? p <= winPos : p - _this.options.threshold <= winPos;
to:
return isDown ? p - _this.options.barOffset <= winPos : p - _this.options.barOffset - _this.options.threshold <= winPos;
If Magellan is applied using the
barOffset
option, the_updateActive()
method does not account for this value when setting the active menu item. This is particularly noticeable when using a sticky menu because if you click on a menu item, you are scrolled to the appropriate section, but the menu item before the selected one will get theactive
class instead of the menu item for the section you just scrolled to. This results in an odd user experience.I believe it's a one-line fix, and it's working for me, so unless there are some other consequences, it should be an easy update.
Line 136 needs to be changed from:
to: