/** * Created by knut on 14-11-23. */ var cd = require('./parser/classDiagram').parser; var cDDb = require('./classDb'); cd.yy = cDDb; var d3 = require('../../d3'); var Logger = require('../../logger'); var dagre = require('dagre'); var log = new Logger.Log(); var idCache; idCache = {}; var classCnt = 0; var conf = { dividerMargin: 10, padding: 5, textHeight: 14 }; // Todo optimize var getGraphId = function (label) { var keys = Object.keys(idCache); var i; for(i=0;i ' + e.w + ': ' + JSON.stringify(g.edge(e))); drawEdge(diagram, g.edge(e), g.edge(e).relation); }); // diagram.attr('height', '100%'); diagram.attr('width', '100%'); // // // // //if(conf.useMaxWidth) { // diagram.attr('height', '100%'); // diagram.attr('width', '100%'); // diagram.attr('style', 'max-width:' + (width) + 'px;'); //}else{ // diagram.attr('height',height); // diagram.attr('width', width ); //} //diagram.attr('viewBox', (box.startx-conf.diagramMarginX) + ' -' +conf.diagramMarginY + ' ' + width + ' ' + height); };