generate svg

pull/3321/head^2
Joseph Izang 2 years ago committed by Aniket
parent bc187802d7
commit a5ac43f8ce
  1. 16
      libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx

@ -735,19 +735,17 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
}
const generateUML = async () => {
const payload = api.getCompilationResult()
const currentFile = api.currentFile
const sourceCode = payload.source.sources[currentFile].content
const ast = parser.parse(sourceCode)
console.log({ ast })
try {
const result = await convertAST2UmlClasses(ast, currentFile)
const diagram = await writeOutputFiles('',currentFile, '', 'png', `${currentFile}Diagram`)
const currentFile = api.currentFile
const ast = parser.parse(api.getCompilationResult().source.sources[currentFile].content)
const result = convertAST2UmlClasses(ast, currentFile)
const converted = convertUmlClasses2Dot(result)
const svgResult = vizRenderStringSync(converted)
console.log({ result })
console.log({ diagram })
console.log({ converted })
console.log({ svgResult })
} catch (error) {
console.log({ error })
console.log({ payload })
}
}

Loading…
Cancel
Save