diff --git a/src/diagrams/sequence/sequenceRenderer.js b/src/diagrams/sequence/sequenceRenderer.js index c297a6526..dee77d889 100644 --- a/src/diagrams/sequence/sequenceRenderer.js +++ b/src/diagrams/sequence/sequenceRenderer.js @@ -186,10 +186,12 @@ const _drawLongText = (text, x, y, g, width) => { }; /** - * Draws an actor in the diagram with the attaced line - * @param center - The center of the the actor - * @param pos The position if the actor in the liost of actors - * @param description The text in the box + * Draws an note in the diagram with the attaced line + * @param elem - The diagram to draw to. + * @param startx - The x axis start position. + * @param verticalPos - The y axis position. + * @param msg - The message to be drawn. + * @param forceWidth - Set this with a custom width to override the default configured width. */ const drawNote = function(elem, startx, verticalPos, msg, forceWidth) { const rect = svgDraw.getNoteRect(); diff --git a/src/diagrams/sequence/svgDraw.js b/src/diagrams/sequence/svgDraw.js index d8047e403..b30c46d36 100644 --- a/src/diagrams/sequence/svgDraw.js +++ b/src/diagrams/sequence/svgDraw.js @@ -73,9 +73,9 @@ export const drawLabel = function(elem, txtObject) { let actorCnt = -1; /** * Draws an actor in the diagram with the attaced line - * @param center - The center of the the actor - * @param pos The position if the actor in the liost of actors - * @param description The text in the box + * @param elem - The diagram we'll draw to. + * @param actor - The actor to draw. + * @param config - The sequence diagram config object. */ export const drawActor = function(elem, left, verticalPos, description, conf) { const center = left + conf.width / 2; @@ -120,10 +120,12 @@ export const anchorElement = function(elem) { return elem.append('g'); }; /** - * Draws an actor in the diagram with the attaced line - * @param elem - element to append activation rect - * @param bounds - activation box bounds - * @param verticalPos - precise y cooridnate of bottom activation box edge + * Draws an activation in the diagram + * @param elem - element to append activation rect. + * @param bounds - activation box bounds. + * @param verticalPos - precise y cooridnate of bottom activation box edge. + * @param conf - sequence diagram config object. + * @param actorActivations - number of activations on the actor. */ export const drawActivation = function(elem, bounds, verticalPos, conf, actorActivations) { const rect = getNoteRect(); @@ -137,10 +139,11 @@ export const drawActivation = function(elem, bounds, verticalPos, conf, actorAct }; /** - * Draws an actor in the diagram with the attaced line - * @param center - The center of the the actor - * @param pos The position if the actor in the list of actors - * @param description The text in the box + * Draws a loop in the diagram + * @param elem - elemenet to append the loop to. + * @param bounds - bounds of the given loop. + * @param labelText - Text within the loop. + * @param config - sequence diagram config object. */ export const drawLoop = function(elem, bounds, labelText, conf) { const g = elem.append('g'); diff --git a/src/diagrams/state/shapes.js b/src/diagrams/state/shapes.js index a436e23b3..3889732e2 100644 --- a/src/diagrams/state/shapes.js +++ b/src/diagrams/state/shapes.js @@ -333,10 +333,9 @@ const _drawLongText = (_text, x, y, g) => { }; /** - * Draws an actor in the diagram with the attaced line - * @param center - The center of the the actor - * @param pos The position if the actor in the liost of actors - * @param description The text in the box + * Draws a note to the diagram + * @param text - The text of the given note. + * @param g - The element the note is attached to. */ export const drawNote = (text, g) => {