restore attribute

This commit is contained in:
Alessandro
2025-08-18 15:34:09 +02:00
parent 2e7c89c6c3
commit b4a8936009
3 changed files with 27 additions and 6 deletions
@@ -8,10 +8,19 @@ type SymbolProps = Omit<EdgeMarker, 'type'>;
const ArrowSymbol = ({ color = 'none', strokeWidth = 1 }: SymbolProps) => {
const style = {
strokeWidth,
...(color && { stroke: color, fill: 'none' }),
...(color && { stroke: color }),
};
return <polyline style={style} strokeLinecap="round" strokeLinejoin="round" fill="none" points="-5,-4 0,0 -5,4" />;
return (
<polyline
className="arrow"
style={style}
strokeLinecap="round"
fill="none"
strokeLinejoin="round"
points="-5,-4 0,0 -5,4"
/>
);
};
const ArrowClosedSymbol = ({ color = 'none', strokeWidth = 1 }: SymbolProps) => {
@@ -20,7 +29,15 @@ const ArrowClosedSymbol = ({ color = 'none', strokeWidth = 1 }: SymbolProps) =>
...(color && { stroke: color, fill: color }),
};
return <polyline style={style} strokeLinecap="round" strokeLinejoin="round" points="-5,-4 0,0 -5,4 -5,-4" />;
return (
<polyline
className="arrowclosed"
style={style}
strokeLinecap="round"
strokeLinejoin="round"
points="-5,-4 0,0 -5,4 -5,-4"
/>
);
};
export const MarkerSymbols = {