This commit is contained in:
Vanessa 2023-07-19 13:55:42 +08:00
parent 4b873f2091
commit 0cac246415
16 changed files with 70 additions and 15 deletions

View file

@ -1,5 +1,6 @@
import {addScript} from "../util/addScript";
import {Constants} from "../../constants";
import {genIconHTML} from "./util";
declare class Viz {
public renderSVGElement: (code: string) => Promise<any>;
@ -24,7 +25,7 @@ export const graphvizRender = (element: Element, cdn = Constants.PROTYLE_CDN) =>
return;
}
if (!e.firstElementChild.classList.contains("protyle-icons")) {
e.insertAdjacentHTML("afterbegin", '<div class="protyle-icons"><span class="protyle-icon protyle-icon--first protyle-action__edit"><svg><use xlink:href="#iconEdit"></use></svg></span><span class="protyle-icon protyle-action__menu protyle-icon--last"><svg><use xlink:href="#iconMore"></use></svg></span></div>');
e.insertAdjacentHTML("afterbegin", genIconHTML());
}
const renderElement = e.firstElementChild.nextElementSibling as HTMLElement;
try {