This commit is contained in:
hamid zarghami
2026-01-04 11:27:53 +03:30
parent aa6153d289
commit 0c6bf2b52b
12 changed files with 758 additions and 291 deletions
@@ -23,6 +23,8 @@ const AbstractShape = ({ obj, isSelected, transformerRef, onSelect, onUpdate, dr
return (
<Star
ref={shapeRef}
id={obj.id}
name={isMask ? "mask-shape" : "canvas-object"}
x={obj.x + (obj.width || 100) / 2}
y={obj.y + (obj.height || 100) / 2}
numPoints={5}
@@ -19,6 +19,8 @@ const CircleShape = ({ obj, isSelected, transformerRef, onSelect, onUpdate, drag
return (
<Circle
ref={shapeRef}
id={obj.id}
name={isMask ? "mask-shape" : "canvas-object"}
x={obj.x}
y={obj.y}
radius={(obj.width || 50) / 2}
@@ -19,6 +19,8 @@ const RectangleShape = ({ obj, isSelected, transformerRef, onSelect, onUpdate, d
return (
<Rect
ref={shapeRef}
id={obj.id}
name={isMask ? "mask-shape" : "canvas-object"}
x={obj.x}
y={obj.y}
width={obj.width || 100}
@@ -20,6 +20,8 @@ const TriangleShape = ({ obj, isSelected, transformerRef, onSelect, onUpdate, dr
return (
<RegularPolygon
ref={shapeRef}
id={obj.id}
name={isMask ? "mask-shape" : "canvas-object"}
x={obj.x + (obj.width || 100) / 2}
y={obj.y + (obj.height || 100) / 2}
sides={3}