Skip to content

Commit 4e38b31

Browse files
Fix graph view cutoff in Explorer with fixed bottom buffer (#1004)
Mostly addresses the issue #1003 - but a new sub-issue has been created to address other related view issues.
2 parents 3e910cd + 3e32f22 commit 4e38b31

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docs/ssvc-explorer/simple.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff 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) {

0 commit comments

Comments
 (0)