fix: adjusted arrowhead design

on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
This commit is contained in:
omkarht
2025-07-21 19:03:29 +05:30
parent 584a789183
commit fda640c90c

View File

@@ -1110,13 +1110,13 @@ export const insertSolidTopArrowHead = function (elem) {
.append('marker')
.attr('id', 'solidTopArrowHead')
.attr('refX', 7.9)
.attr('refY', 5.25)
.attr('refY', 7.25)
.attr('markerUnits', 'userSpaceOnUse')
.attr('markerWidth', 12)
.attr('markerHeight', 12)
.attr('orient', 'auto-start-reverse')
.append('path')
.attr('d', 'M 0 -0.25 L 10 6 L 0 6 z'); // this is actual shape for arrowhead
.attr('d', 'M 0 0 L 10 8 L 0 8 z'); // this is actual shape for arrowhead
};
export const insertSolidBottomArrowHead = function (elem) {
@@ -1125,13 +1125,13 @@ export const insertSolidBottomArrowHead = function (elem) {
.append('marker')
.attr('id', 'solidBottomArrowHead')
.attr('refX', 7.9)
.attr('refY', 4.7)
.attr('refY', 0.75)
.attr('markerUnits', 'userSpaceOnUse')
.attr('markerWidth', 12)
.attr('markerHeight', 12)
.attr('orient', 'auto-start-reverse')
.append('path')
.attr('d', 'M 0.1 10 L 10 4 L 0 4 z');
.attr('d', 'M 0 0 L 10 0 L 0 8 z');
};
export const insertStickTopArrowHead = function (elem) {
@@ -1139,14 +1139,14 @@ export const insertStickTopArrowHead = function (elem) {
.append('defs')
.append('marker')
.attr('id', ' stickTopArrowHead')
.attr('refX', 10.5)
.attr('refY', 10)
.attr('refX', 7.5)
.attr('refY', 7)
.attr('markerUnits', 'userSpaceOnUse')
.attr('markerWidth', 12)
.attr('markerHeight', 12)
.attr('orient', 'auto-start-reverse')
.append('path')
.attr('d', 'M 0 0 L 10 10')
.attr('d', 'M 0 0 L 7 7')
.attr('stroke', 'black')
.attr('stroke-width', 1.5)
.attr('fill', 'none');
@@ -1157,14 +1157,14 @@ export const insertStickBottomArrowHead = function (elem) {
.append('defs')
.append('marker')
.attr('id', ' stickBottomArrowHead')
.attr('refX', 10)
.attr('refY', 5.25)
.attr('refX', 7.5)
.attr('refY', 0)
.attr('markerUnits', 'userSpaceOnUse')
.attr('markerWidth', 12)
.attr('markerHeight', 12)
.attr('orient', 'auto-start-reverse')
.append('path')
.attr('d', 'M 10 5 L 0 10') // Diagonal line down from (10,5) to (0,10)
.attr('d', 'M 0 7 L 7 0')
.attr('stroke', 'black')
.attr('stroke-width', 1.5)
.attr('fill', 'none');