This commit is contained in:
hamid zarghami
2025-11-19 08:57:42 +03:30
parent 3f18ac62fa
commit 3b47e29ba4
3 changed files with 29 additions and 12 deletions
@@ -13,7 +13,9 @@ const AbstractShape = ({ obj, isSelected, transformerRef, onSelect, onUpdate, dr
}
}, [isSelected, transformerRef]);
const radius = Math.min((obj.width || 100) / 2, (obj.height || 100) / 2);
const baseRadius = Math.min((obj.width || 100) / 2, (obj.height || 100) / 2);
const abstractScale = 0.85;
const radius = baseRadius * abstractScale;
const innerRadius = radius * 0.5;
return (
@@ -51,7 +53,7 @@ const AbstractShape = ({ obj, isSelected, transformerRef, onSelect, onUpdate, dr
node.scaleX(1);
node.scaleY(1);
const newRadius = Math.max(5, radius * Math.min(scaleX, scaleY));
const newRadius = Math.max(5, baseRadius * Math.min(scaleX, scaleY));
const newSize = newRadius * 2;
onUpdate(obj.id, {
x: node.x() - newSize / 2,