fix resize

This commit is contained in:
hamid zarghami
2026-01-05 15:22:30 +03:30
parent 5e0550ec26
commit f492d4a29f
11 changed files with 160 additions and 192 deletions
@@ -45,24 +45,6 @@ const ImageObject = ({
y: node.y(),
});
}}
onTransformEnd={() => {
const node = shapeRef.current;
if (!node) return;
const scaleX = node.scaleX();
const scaleY = node.scaleY();
node.scaleX(1);
node.scaleY(1);
onUpdate(obj.id, {
x: node.x(),
y: node.y(),
rotation: node.rotation(),
width: Math.max(5, (obj.width || image.width) * scaleX),
height: Math.max(5, (obj.height || image.height) * scaleY),
});
}}
/>
);
};