Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Aug 22, 2024
1 parent 02bac1d commit bfee02c
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
6 changes: 5 additions & 1 deletion packages/mermaid/src/diagrams/common/svgDrawCommon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ export const drawRect = (element: SVG | SVGGroup, rectData: RectData): D3RectEle
* @param element - Diagram (reference for bounds)
* @param bounds - Shape of the rectangle
*/
export const drawBackgroundRect = (element: SVG | SVGGroup, bounds: Bound, customClass?: string): void => {
export const drawBackgroundRect = (
element: SVG | SVGGroup,
bounds: Bound,
customClass?: string
): void => {
const rectData: RectData = {
x: bounds.startx,
y: bounds.starty,
Expand Down
6 changes: 3 additions & 3 deletions packages/mermaid/src/diagrams/sequence/svgDraw.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ export const drawText = function (elem, textData) {
yfunc = () =>
Math.round(
textData.y +
(prevTextHeight + textHeight + 2 * textData.textMargin) -
textData.textMargin
(prevTextHeight + textHeight + 2 * textData.textMargin) -
textData.textMargin
);
break;
}
Expand Down Expand Up @@ -518,7 +518,7 @@ export const drawActor = async function (elem, actor, conf, isFooter) {
export const drawBox = function (elem, box, conf) {
const boxplusTextGroup = elem.append('g');
const g = boxplusTextGroup;

drawBackgroundRect(g, box);
if (box.name) {
_drawTextCandidateFunc(conf)(
Expand Down
2 changes: 1 addition & 1 deletion packages/mermaid/src/themes/theme-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class Theme {
/* Sequence Diagram variables */

// this.actorBorder = lighten(this.border1, 0.5);
this.boxBorder = (this.darkMode ? 'white' : 'black');
this.boxBorder = this.darkMode ? 'white' : 'black';
this.actorBorder = this.actorBorder || this.primaryBorderColor;
this.actorBkg = this.actorBkg || this.mainBkg;
this.actorTextColor = this.actorTextColor || this.primaryTextColor;
Expand Down
2 changes: 1 addition & 1 deletion packages/mermaid/src/themes/theme-default.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Theme {
this.edgeLabelBackground = 'calculated';

/* Sequence Diagram variables */
this.boxBorder = (this.darkMode ? 'white' : 'black');
this.boxBorder = this.darkMode ? 'white' : 'black';
this.actorBorder = 'calculated';
this.actorBkg = 'calculated';
this.actorTextColor = 'black';
Expand Down
2 changes: 1 addition & 1 deletion packages/mermaid/src/themes/theme-forest.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Theme {
this.edgeLabelBackground = '#e8e8e8';

/* Sequence Diagram variables */
this.boxBorder = (this.darkMode ? 'white' : 'black');
this.boxBorder = this.darkMode ? 'white' : 'black';
this.actorBorder = 'calculated';
this.actorBkg = 'calculated';
this.actorTextColor = 'black';
Expand Down
2 changes: 1 addition & 1 deletion packages/mermaid/src/themes/theme-neutral.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Theme {
this.edgeLabelBackground = 'white';

/* Sequence Diagram variables */
this.boxBorder = (this.darkMode ? 'white' : 'black');
this.boxBorder = this.darkMode ? 'white' : 'black';
this.actorBorder = 'calculated';
this.actorBkg = 'calculated';
this.actorTextColor = 'calculated';
Expand Down

0 comments on commit bfee02c

Please sign in to comment.