Skip to content

Commit 5096c7c

Browse files
AlekseiVambolpd3
authored andcommitted
Fix JS libraries embedding for offline rendering
Unshadow the $dat variable in "sub embed_js" to allow it to return the embedded script. Remove a pair of hard-coded script definitions from HTML code, which are redundant in the presence of $d3js and $pakojs.
1 parent 3e3cab6 commit 5096c7c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

misc/roh-viz

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,6 @@ sub generate_html
281281
.line { fill: none; }
282282
</style>
283283
284-
<script src="https://d3js.org/d3.v6.js"></script>
285-
<script src="https://cdnjs.cloudflare.com/ajax/libs/pako/2.0.4/pako.min.js"></script>
286-
287-
288284
$d3js
289285
$pakojs
290286
<script type="text/javascript" defer>
@@ -779,7 +775,7 @@ sub embed_js
779775
{
780776
my $tmp = "$$opts{outfile}.rmme";
781777
cmd(qq[wget -O $tmp $file]);
782-
my $dat = join('',`cat $tmp`);
778+
$dat = join('',`cat $tmp`);
783779
unlink($tmp);
784780
}
785781
return $dat;

0 commit comments

Comments
 (0)