Skip to content

Commit

Permalink
#4967 Reverting optimimization that breaks subgraphs
Browse files Browse the repository at this point in the history
  • Loading branch information
knsv committed Oct 20, 2023
1 parent d1b386b commit 61bc293
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cypress/platform/knsv2.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@
</head>
<body>
<pre id="diagram" class="mermaid">
classDiagram
`Class<img src=x onerror=alert(1)>` <|-- `Class2<img src=x onerror=alert(2)>`
flowchart-elk LR
subgraph example
node
end
</pre>
<pre id="diagram" class="mermaid2">
flowchart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -803,8 +803,14 @@ const insertChildren = (nodeArray, parentLookupDb) => {
*/

export const draw = async function (text, id, _version, diagObj) {
// Add temporary render element
diagObj.db.clear();
nodeDb = {};
portPos = {};
diagObj.db.setGen('gen-2');
// Parse the graph definition
diagObj.parser.parse(text);

const renderEl = select('body').append('div').attr('style', 'height:400px').attr('id', 'cy');
let graph = {
id: 'root',
Expand Down

0 comments on commit 61bc293

Please sign in to comment.