fix group 2

This commit is contained in:
hamid zarghami
2026-05-02 09:42:58 +03:30
parent 0ce2b3e85d
commit a4d10caacd
3 changed files with 70 additions and 19 deletions
@@ -97,25 +97,7 @@ const ObjectsLayer = ({
.filter((obj) => obj.groupId && obj.type !== "group")
.map((obj) => {
const groupObject = objects.find((o) => o.id === obj.groupId);
// داده قدیمی/ناقص: groupId بدون شیء type:group در صفحه — مثل preview همه را نشان بده
if (!groupObject) {
return (
<ObjectRenderer
key={obj.id}
obj={obj}
isSelected={selectedObjectIds.includes(obj.id)}
transformerRef={transformerRef}
layerRef={layerRef}
onSelect={onSelect}
onUpdate={onUpdate}
draggable={tool === "select"}
onCellClick={onCellClick}
onCellDblClick={onCellDblClick}
selectedCellId={selectedCellId}
allObjects={objects}
/>
);
}
if (!groupObject) return null;
// Render with absolute position but wrapped in non-listening group
return (