Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
__loadDXFData(text) {
let parser = new DXFParser();
let dxfdata = parser.parseSync(text);
let dxfobjects = [];
for(let i in dxfdata.entities){
let entity = dxfdata.entities[i];
dxfobjects.push(new DXFObject(entity));
}
this.dxfData = dxfobjects;
let render = DXFRenderer.renderDXFObjects(this.dxfData);
this.__currentRenderSVG = render.exportSVG();
let bounds = render.bounds;
let zoom = this.__computeOptimalZoom(bounds.width, bounds.height);
paper.view.zoom = zoom;
paper.view.center = bounds.center;
}