live color line
This commit is contained in:
@@ -13,6 +13,8 @@ const ArrowShape = ({ obj, isSelected, onSelect, onUpdate, draggable }: ShapePro
|
||||
const endX = obj.width || 0;
|
||||
const endY = obj.height || 0;
|
||||
|
||||
const actualStrokeWidth = obj.strokeWidth ?? 2;
|
||||
|
||||
return (
|
||||
<Arrow
|
||||
ref={shapeRef}
|
||||
@@ -21,7 +23,7 @@ const ArrowShape = ({ obj, isSelected, onSelect, onUpdate, draggable }: ShapePro
|
||||
y={startY}
|
||||
points={[0, 0, endX - startX, endY - startY]}
|
||||
stroke={isSelected ? "#3b82f6" : obj.stroke || "#000000"}
|
||||
strokeWidth={isSelected ? 3 : (obj.strokeWidth ?? 2)}
|
||||
strokeWidth={actualStrokeWidth}
|
||||
fill={isSelected ? "#3b82f6" : obj.stroke || "#000000"}
|
||||
hitStrokeWidth={20}
|
||||
perfectDrawEnabled={false}
|
||||
|
||||
@@ -13,14 +13,16 @@ const LineShape = ({ obj, isSelected, onSelect, onUpdate, draggable }: ShapeProp
|
||||
const endX = obj.width || 0;
|
||||
const endY = obj.height || 0;
|
||||
|
||||
const actualStrokeWidth = obj.strokeWidth ?? 2;
|
||||
|
||||
return (
|
||||
<Line
|
||||
ref={shapeRef}
|
||||
x={startX}
|
||||
y={startY}
|
||||
points={[0, 0, endX - startX, endY - startY]}
|
||||
stroke={isSelected ? "#3b82f6" : obj.stroke || "#000000"}
|
||||
strokeWidth={isSelected ? 3 : (obj.strokeWidth ?? 2)}
|
||||
stroke={obj.stroke || "#000000"}
|
||||
strokeWidth={actualStrokeWidth}
|
||||
hitStrokeWidth={20}
|
||||
perfectDrawEnabled={false}
|
||||
rotation={obj.rotation || 0}
|
||||
|
||||
Reference in New Issue
Block a user