mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-21 08:19:43 +02:00
enable eslint fix and eslint-plugin-jsdoc
This commit is contained in:

committed by
Matthieu Morel

parent
c29c8bd33c
commit
4d103c14f7
@@ -17,16 +17,18 @@ export const setConf = function (cnf) {
|
||||
|
||||
/**
|
||||
* Draws a an info picture in the tag with id: id based on the graph definition in text.
|
||||
* @param text
|
||||
* @param id
|
||||
*
|
||||
* @param {any} text
|
||||
* @param {any} id
|
||||
* @param {any} version
|
||||
*/
|
||||
export const draw = (txt, id, ver) => {
|
||||
export const draw = (text, id, version) => {
|
||||
try {
|
||||
const parser = infoParser.parser;
|
||||
parser.yy = db;
|
||||
log.debug('Renering info diagram\n' + txt);
|
||||
log.debug('Renering info diagram\n' + text);
|
||||
// Parse the graph definition
|
||||
parser.parse(txt);
|
||||
parser.parse(text);
|
||||
log.debug('Parsed info diagram');
|
||||
// Fetch the default direction, use TD if none was found
|
||||
const svg = select('#' + id);
|
||||
@@ -39,7 +41,7 @@ export const draw = (txt, id, ver) => {
|
||||
.attr('class', 'version')
|
||||
.attr('font-size', '32px')
|
||||
.style('text-anchor', 'middle')
|
||||
.text('v ' + ver);
|
||||
.text('v ' + version);
|
||||
|
||||
svg.attr('height', 100);
|
||||
svg.attr('width', 400);
|
||||
|
Reference in New Issue
Block a user