enable prettier-plugin-jsdoc

This commit is contained in:
Matthieu MOREL
2021-11-10 08:41:52 +01:00
committed by GitHub
parent 4d103c14f7
commit 57671b2b78
47 changed files with 2293 additions and 2681 deletions

View File

@@ -11,9 +11,9 @@ import { configureSvgSize } from '../../utils';
const conf = {};
/**
* Allows the top-level API module to inject config specific to this renderer,
* storing it in the local conf object. Note that generic config still needs to be
* retrieved using getConfig() imported from the config module
* Allows the top-level API module to inject config specific to this renderer, storing it in the
* local conf object. Note that generic config still needs to be retrieved using getConfig()
* imported from the config module
*
* @param cnf
*/
@@ -27,10 +27,10 @@ export const setConf = function (cnf) {
/**
* Draw attributes for an entity
*
* @param groupNode the svg group node for the entity
* @param entityTextNode the svg node for the entity label text
* @param attributes an array of attributes defined for the entity (each attribute has a type and a name)
* @returns the bounding box of the entity, after attributes have been added
* @param groupNode The svg group node for the entity
* @param entityTextNode The svg node for the entity label text
* @param attributes An array of attributes defined for the entity (each attribute has a type and a name)
* @returns The bounding box of the entity, after attributes have been added
*/
const drawAttributes = (groupNode, entityTextNode, attributes) => {
const heightPadding = conf.entityPadding / 3; // Padding internal to attribute boxes
@@ -273,7 +273,7 @@ const drawAttributes = (groupNode, entityTextNode, attributes) => {
/**
* Use D3 to construct the svg elements for the entities
*
* @param svgNode the svg node that contains the diagram
* @param svgNode The svg node that contains the diagram
* @param entities The entities to be drawn
* @param graph The graph that contains the vertex and edge definitions post-layout
* @returns The first entity that was inserted
@@ -361,8 +361,8 @@ const getEdgeName = function (rel) {
/**
* Add each relationship to the graph
*
* @param relationships the relationships to be added
* @param g the graph
* @param relationships The relationships to be added
* @param g The graph
* @returns {Array} The array of relationships
*/
const addRelationships = function (relationships, g) {
@@ -376,10 +376,11 @@ let relCnt = 0;
/**
* Draw a relationship using edge information from the graph
*
* @param svg the svg node
* @param rel the relationship to draw in the svg
* @param g the graph containing the edge information
* @param insert the insertion point in the svg DOM (because relationships have markers that need to sit 'behind' opaque entity boxes)
* @param svg The svg node
* @param rel The relationship to draw in the svg
* @param g The graph containing the edge information
* @param insert The insertion point in the svg DOM (because relationships have markers that need to
* sit 'behind' opaque entity boxes)
*/
const drawRelationshipFromLayout = function (svg, rel, g, insert) {
relCnt++;
@@ -509,8 +510,8 @@ const drawRelationshipFromLayout = function (svg, rel, g, insert) {
/**
* Draw en E-R diagram in the tag with id: id based on the text definition of the diagram
*
* @param text the text of the diagram
* @param id the unique id of the DOM node that contains the diagram
* @param text The text of the diagram
* @param id The unique id of the DOM node that contains the diagram
*/
export const draw = function (text, id) {
log.info('Drawing ER diagram');