Skip to content

Commit

Permalink
Merge pull request #66 from ray-pH/dev
Browse files Browse the repository at this point in the history
html_int: fix control svg attribute
  • Loading branch information
ray-pH authored Jun 20, 2024
2 parents 39e1fcf + 68804cd commit 41407ac
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/html_interactivity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,10 @@ export class Interactive {
svg.setAttribute("overflow", "visible");
svg.setAttribute("class", classlist.join(" "));
svg.setAttribute("id",id);

control_svg.setAttribute("viewBox", diagram_svg.getAttribute("viewBox") as string);
control_svg.setAttribute("preserveAspectRatio", diagram_svg.getAttribute("preserveAspectRatio") as string);
control_svg.style.overflow = "visible";

control_svg.appendChild(svg);
this.custom_svg = control_svg;
Expand All @@ -635,6 +639,10 @@ export class Interactive {
g.setAttribute("overflow", "visible");
g.setAttribute("class", classlist.join(" "));
g.setAttribute("id",id);

control_svg.setAttribute("viewBox", diagram_svg.getAttribute("viewBox") as string);
control_svg.setAttribute("preserveAspectRatio", diagram_svg.getAttribute("preserveAspectRatio") as string);
control_svg.style.overflow = "visible";

control_svg.appendChild(g);
this.custom_svg = control_svg;
Expand Down

0 comments on commit 41407ac

Please sign in to comment.