updated icon shapes

This commit is contained in:
saurabhg772244
2024-09-18 21:51:22 +05:30
parent dd261a54df
commit a52949318a
4 changed files with 4 additions and 4 deletions

View File

@@ -75,7 +75,7 @@ export const icon = async (
label.attr( label.attr(
'transform', '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( iconShape.attr(

View File

@@ -70,7 +70,7 @@ export const iconCircle = async (
iconElem.selectAll('path').attr('fill', stylesMap.get('stroke') || nodeBorder); iconElem.selectAll('path').attr('fill', stylesMap.get('stroke') || nodeBorder);
label.attr( label.attr(
'transform', '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( iconShape.attr(

View File

@@ -80,7 +80,7 @@ export const iconRounded = async (
label.attr( label.attr(
'transform', '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( iconShape.attr(

View File

@@ -79,7 +79,7 @@ export const iconSquare = async (
label.attr( label.attr(
'transform', '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( iconShape.attr(