mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-18 14:59:53 +02:00
updated icon shapes
This commit is contained in:
@@ -75,7 +75,7 @@ export const icon = async (
|
||||
|
||||
label.attr(
|
||||
'transform',
|
||||
`translate(${-width / 2 + width / 2 - bbox.width / 2},${topLabel ? -height / 2 - bbox.height / 2 - labelPadding / 2 : height / 2 - bbox.height / 2 + labelPadding / 2})`
|
||||
`translate(${-bbox.width / 2},${topLabel ? -height / 2 - bbox.height / 2 - labelPadding / 2 : height / 2 - bbox.height / 2 + labelPadding / 2})`
|
||||
);
|
||||
|
||||
iconShape.attr(
|
||||
|
@@ -70,7 +70,7 @@ export const iconCircle = async (
|
||||
iconElem.selectAll('path').attr('fill', stylesMap.get('stroke') || nodeBorder);
|
||||
label.attr(
|
||||
'transform',
|
||||
`translate(${-diameter / 2 + diameter / 2 - bbox.width / 2},${topLabel ? -diameter / 2 - bbox.height / 2 : diameter / 2 - bbox.height / 2 + labelPadding / 2})`
|
||||
`translate(${-bbox.width / 2},${topLabel ? -diameter / 2 - bbox.height / 2 : diameter / 2 - bbox.height / 2 + labelPadding / 2})`
|
||||
);
|
||||
|
||||
iconShape.attr(
|
||||
|
@@ -80,7 +80,7 @@ export const iconRounded = async (
|
||||
|
||||
label.attr(
|
||||
'transform',
|
||||
`translate(${-width / 2 + width / 2 - bbox.width / 2},${topLabel ? -height / 2 - bbox.height / 2 - labelPadding / 2 : height / 2 - bbox.height / 2 + labelPadding / 2})`
|
||||
`translate(${-bbox.width / 2},${topLabel ? -height / 2 - bbox.height / 2 - labelPadding / 2 : height / 2 - bbox.height / 2 + labelPadding / 2})`
|
||||
);
|
||||
|
||||
iconShape.attr(
|
||||
|
@@ -79,7 +79,7 @@ export const iconSquare = async (
|
||||
|
||||
label.attr(
|
||||
'transform',
|
||||
`translate(${-width / 2 + width / 2 - bbox.width / 2},${topLabel ? -height / 2 - bbox.height / 2 - labelPadding / 2 : height / 2 - bbox.height / 2 + labelPadding / 2})`
|
||||
`translate(${-bbox.width / 2},${topLabel ? -height / 2 - bbox.height / 2 - labelPadding / 2 : height / 2 - bbox.height / 2 + labelPadding / 2})`
|
||||
);
|
||||
|
||||
iconShape.attr(
|
||||
|
Reference in New Issue
Block a user