diff options
Diffstat (limited to 'src/scaladoc/scala/tools/nsc/doc/html/resource/lib/diagrams.js')
-rw-r--r-- | src/scaladoc/scala/tools/nsc/doc/html/resource/lib/diagrams.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/scaladoc/scala/tools/nsc/doc/html/resource/lib/diagrams.js b/src/scaladoc/scala/tools/nsc/doc/html/resource/lib/diagrams.js index 5d139c1080..b13732760a 100644 --- a/src/scaladoc/scala/tools/nsc/doc/html/resource/lib/diagrams.js +++ b/src/scaladoc/scala/tools/nsc/doc/html/resource/lib/diagrams.js @@ -60,8 +60,8 @@ $(document).ready(function() diagrams.initHighlighting(); $("button#diagram-fs").click(function() { - $("#inheritance-diagram-container").toggleClass("full-screen"); - $("#inheritance-diagram-container > div.diagram").css({ + $(".diagram-container").toggleClass("full-screen"); + $(".diagram-container > div.diagram").css({ height: $("svg").height() + "pt" }); @@ -155,7 +155,7 @@ diagrams.initHighlighting = function() */ diagrams.resize = function() { // available width - var availableWidth = $("body").width() - 100; + var availableWidth = $(".diagram-container").width(); $(".diagram-container").each(function() { // unregister click event on whole div @@ -163,7 +163,7 @@ diagrams.resize = function() { var diagramWidth = $(".diagram", this).data("width"); var diagramHeight = $(".diagram", this).data("height"); - if(diagramWidth > availableWidth) { + if (diagramWidth > availableWidth) { // resize diagram var height = diagramHeight / diagramWidth * availableWidth; $(".diagram svg", this).width(availableWidth); @@ -204,7 +204,7 @@ diagrams.toggle = function(container, dontAnimate) $("#diagram-controls", container).show(); - $("#inheritance-diagram-container").on('mousewheel.focal', function(e) { + $(".diagram-container").on('mousewheel.focal', function(e) { e.preventDefault(); var delta = e.delta || e.originalEvent.wheelDelta; var zoomOut = delta ? delta < 0 : e.originalEvent.deltaY > 0; |