bitfehler / xs3p

Modernized fork of the xs3p XSD documentation tool - using bootstrap, markdown and HTML5.
Other
44 stars 41 forks source link

Non scrolling sidebar when the screen is wide makes content inacessible #4

Open pauloneves opened 7 years ago

pauloneves commented 7 years ago

If the page is narrow, the side bar .xs3p-sidebar goes to the top and the content is below. When I scroll the page it scrolls down normally.

If I resize the browser window to a wide size, the .xs3p-sidebar becomes fixed and doesn't scroll anymore. If its content is bigger than the windows size, it becomes impossible to access all the content in the side bar.

I believe the error is in the piece of code below, but I couldn't solve it:

               $(window).scroll(function() {
                  if ($(".xs3p-sidebar").css("position") == "fixed" && $(window).height() < $(".xs3p-sidebar").height()) {
                     var perc = $(window).scrollTop() / $("#xs3p-content").height();
                     var overflow = $(".xs3p-sidebar").height() + 105 - $(window).height();
                     $(".xs3p-sidebar").css("top", (65 - Math.round(overflow * perc)) + "px");
                  }
               });

I'm viewing my xsd schema file in Mozilla Firefox version 53 and processing it just adding the tag <?xml-stylesheet type="text/xsl" href="geradores/xs3p_bootstrap/xs3p.xsl"?> as the second line of my schema file.

BTW, thanks for the nice project.

pauloneves commented 7 years ago

I've just saw that the bug just happens when using firefox internal xslt processor. Generating the file through xsltproc.exe everything worked fine. Maybe it isn't a bug anymore.

ademar59 commented 7 years ago

I have the same issue I resolved it by changing the ccs style .xs3p-sidebar { position: fixed; top: 65px; width: 22%; height: 100%; overflow: auto; }

on line 828

and it's works for me