restore attribute
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user