rectange
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user