Message199719
> One minor nit: when I close the sidebar, then scroll and then reopen
> it, it does not immediately update the sidebar position, only when
> scrolling again.
I'll look into it.
> You said you made it a bit more efficient; is this python-specific
> or can it be ported back to Sphinx?
Some could be backported:
* $('.sphinxsidebarwrapper'), $(window), and $('.sphinxsidebar') are re-evaluated every time the user scrolls. In sidebar.js I already had references to these, so I reused them; in Sphinx you can move them outside the .scroll();
* The original code used $(window).innerHeight(), but the code in sidebar.js used window.innerHeight if available or $(window).height() if not. I kept the latter, however I'm not sure that is the best option;
* $(document) and sidebar_height could also be calculated once at the beginning, since they shouldn't change, but I haven't done it in my patch;
* In the patch I also renamed a few variables to be more clear;
* The fix in #4711 could also be backported. |
|
Date |
User |
Action |
Args |
2013-10-13 15:08:11 | ezio.melotti | set | recipients:
+ ezio.melotti, georg.brandl, terry.reedy, orsenthil, ned.deily |
2013-10-13 15:08:11 | ezio.melotti | set | messageid: <1381676891.06.0.254250499411.issue4965@psf.upfronthosting.co.za> |
2013-10-13 15:08:11 | ezio.melotti | link | issue4965 messages |
2013-10-13 15:08:10 | ezio.melotti | create | |
|