chore: Remove unused function

This commit is contained in:
Sidharth Vinod 2024-10-02 18:41:35 +05:30
parent 5c67e42a55
commit dfcb4af18b
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD

View File

@ -1,6 +1,4 @@
import { select } from 'd3';
import { insertNode } from '../dagre-wrapper/nodes.js';
import { getConfig } from '../diagram-api/diagramAPI.js';
export const getDiagramElement = (id, securityLevel) => {
let sandboxElement;
@ -18,41 +16,3 @@ export const getDiagramElement = (id, securityLevel) => {
return svg;
};
export function insertElementsForSize(el, data) {
const nodesElem = el.insert('g').attr('class', 'nodes');
el.insert('g').attr('class', 'edges');
const config = getConfig();
data.nodes.forEach(async (item) => {
item.shape = 'rect';
await insertNode(
nodesElem,
{
...item,
class: 'default flowchart-label',
labelStyle: '',
x: 0,
y: 0,
width: 100,
rx: 0,
ry: 0,
height: 100,
shape: 'rect',
padding: 8,
},
{ config }
);
// Create a new DOM element
// const element = document.createElement('div');
// // Set the content of the element to the name of the item
// element.textContent = item.name;
// // Set the size of the element to the size of the item
// element.style.width = `${item.size}px`;
// element.style.height = `${item.size}px`;
// Append the element to the body of the document
// document.body.appendChild(element);
});
}