File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -89,9 +89,9 @@ const graphModule = (function() {
8989 height = 800 - margin . top - margin . bottom
9090 if ( showFullTree ) {
9191 var add_offset = 0
92- if ( raw . length > 60 )
93- add_offset = ( raw . length - 60 ) * 5
94- height = 1300 - margin . top - margin . bottom + add_offset
92+ if ( raw . length > 60 )
93+ add_offset = ( raw . length - 60 ) * 10
94+ height = Math . max ( 1300 , raw . length * 20 ) - margin . top - margin . bottom + add_offset
9595 }
9696 duration = 750
9797 tree = d3 . layout . tree ( )
@@ -309,6 +309,10 @@ const graphModule = (function() {
309309
310310 var yOffset = 90 ;
311311 var xOffset = - xMin + yOffset ;
312+ var newHeight = xMax - xMin + 2 * yOffset ;
313+ if ( newHeight > parseInt ( $ ( 'svg.mgraph' ) . attr ( "height" ) ) ) {
314+ $ ( 'svg.mgraph' ) . attr ( "height" , newHeight ) ;
315+ }
312316 svg . attr ( "transform" , "translate(" + 100 + "," + xOffset + ")" ) ;
313317 }
314318 function check_children ( d , a , b ) {
You can’t perform that action at this time.
0 commit comments