This PR fixes the issues addressed in #14. Now instead of testing the heading's position, the plugin tests the location of the beginning and end of each section against an "inner viewport". The offset of this inner viewport from the top and bottom of the actual window is adjustable with the option scrollOffset. This option also controls the scrolling location when selecting a nav link. Any section within the bounds of this inner viewport will be set to active, meaning if there are 4 short sections within this window, all of them will show as active (see the homepage for an example of how this is currently broken).
NOTES: This PR is dependent on the new naming conventions and sectioning of the articles markup set up in #13. Do not attempt to merge before merging #13.
This PR fixes the issues addressed in #14. Now instead of testing the heading's position, the plugin tests the location of the beginning and end of each section against an "inner viewport". The offset of this inner viewport from the top and bottom of the actual window is adjustable with the option
scrollOffset
. This option also controls the scrolling location when selecting a nav link. Any section within the bounds of this inner viewport will be set to active, meaning if there are 4 short sections within this window, all of them will show as active (see the homepage for an example of how this is currently broken).NOTES: This PR is dependent on the new naming conventions and sectioning of the articles markup set up in #13. Do not attempt to merge before merging #13.