fix for dashboard menu scrollspy; fixes #2356
Costa Tsaousis (ktsaou) committed
Jun 18, 2017 at 14:45 UTC
00f9e7f743066e1ca10c3d3f6a3eef27bf487a58
1 file changed
+4
-1
web/index.html
+4
-1
@@ -2730,9 +2730,12 @@
2730
});
2731
2732
/* activate bootstrap scrollspy (needed for sidebar) */
2733
+ var scrollspyOffset = $(window).height() / 5;
2734
+ if(scrollspyOffset > 200) scrollspyOffset = 200;
2735
+ if(scrollspyOffset < 50) scrollspyOffset = 50;
2736
$(document.body).scrollspy({
2737
target: '#sidebar',
2735
- offset: $(window).height() / 5 // controls the diff of the <hX> element to the top, to select it
2738
+ offset: scrollspyOffset // controls the diff of the <hX> element to the top, to select it
2739
});
2740
2741
// change the URL based on the current position of the screen