Skip to content

Commit

Permalink
Display updates for iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-vsarvepalli committed Mar 1, 2024
1 parent b9e2b7c commit f69876c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
8 changes: 6 additions & 2 deletions docs/ssvc-calc/css.css
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
}
#mpopup {
font-size: smaller;
max-width: 400px;
max-width: 300px;
}
#mgraph {
margin-left: 600px;
Expand Down Expand Up @@ -350,8 +350,9 @@ body.whitebody
max-width:40%;
}
#mpopup {
max-width: 600px;
max-width: 400px;
overflow-y: auto;
text-shadow: none;
/* Just one greater than modal */
z-index: 1051;
display: none;
Expand Down Expand Up @@ -453,3 +454,6 @@ pre {
.btn-dark.btn-bordered:hover {
border: 2px solid white;
}
textPath {
cursor: pointer;
}
14 changes: 12 additions & 2 deletions docs/ssvc-calc/ssvc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,11 @@ function generate_uuid() {
return uuid+'-'+Math.random().toString(16).substr(2,12)
}

function togglehelp() {
$('#mpopup').toggleClass("d-none");
$('#frbcbx').prop("checked",$('#mpopup').hasClass("d-none"));
}

function draw_graph() {
var margin = {top: 20, right: 120, bottom: 20, left: 120},
width = 1060 - margin.right - margin.left,
Expand Down Expand Up @@ -1049,6 +1054,11 @@ function draw_graph() {
}
$('#zoomcontrol').show();
$('#zoomcontrol input').val(100);
$('#graph').html($('<div>').attr({"id":"frbdiv"}).css({"position": "fixed","font-size": "x-small"})
.on("click",togglehelp).append($('<input>')
.attr({"id": "frbcbx","type": "checkbox"})
.css({"width": "10px"}))
.append($('<span>').html("Hide help text"))));
svg = d3.select("#graph").append("svg")
.attr("xmlns","http://www.w3.org/2000/svg")
.attr("preserveAspectRatio","none")
Expand All @@ -1057,7 +1067,7 @@ function draw_graph() {
.attr("height", svg_height)
.append("g")
.attr("transform", default_translate)
.attr("id","pgroup")
.attr("id","pgroup");

root = treeData[0];
root.x0 = height / 2;
Expand Down Expand Up @@ -1377,7 +1387,7 @@ function showdiv(d) {
}
}
function hidediv(d) {
$('#mpopup').hide()
$('#mpopup').hide();
}
function checkclose() {
/* */
Expand Down

0 comments on commit f69876c

Please sign in to comment.