Skip to content

Commit

Permalink
remove unused params from drawActivation
Browse files Browse the repository at this point in the history
  • Loading branch information
ad1992 committed Apr 23, 2024
1 parent 04f74a9 commit 82f05ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
8 changes: 1 addition & 7 deletions packages/mermaid/src/diagrams/sequence/sequenceRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -831,13 +831,7 @@ export const draw = async function (_text: string, id: string, _version: string,
activationData.starty = verticalPos - 6;
verticalPos += 12;
}
svgDraw.drawActivation(
diagram,
activationData,
verticalPos,
conf,
actorActivations(msg.from.actor).length
);
svgDraw.drawActivation(activationData, verticalPos, actorActivations(msg.from.actor).length);

bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos);
}
Expand Down
5 changes: 2 additions & 3 deletions packages/mermaid/src/diagrams/sequence/svgDraw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -562,17 +562,16 @@ export const anchorElement = function (elem) {
* @param actorActivations - Count of activations on the actor.
*/
export const drawActivation = function (
elem: SVG,
bounds: Bound,
verticalPos: number,
conf: SequenceDiagramConfig,
actorActivations: number
) {
const rect = svgDrawCommon.getNoteRect();
const g = bounds.anchored;
rect.x = bounds.startx;
rect.y = bounds.starty;
rect.class = `activation${actorActivations % 3}`; // Will evaluate to 0, 1 or 2
// Will evaluate to 0, 1 or 2
rect.class = `activation${actorActivations % 3}`;
rect.width = bounds.stopx - bounds.startx;
rect.height = verticalPos - bounds.starty;
drawRect(g, rect);
Expand Down

0 comments on commit 82f05ca

Please sign in to comment.