fix group

This commit is contained in:
hamid zarghami
2026-05-02 09:23:20 +03:30
parent c05bcdaa48
commit 0ce2b3e85d
2 changed files with 20 additions and 2 deletions
@@ -97,7 +97,25 @@ const ObjectsLayer = ({
.filter((obj) => obj.groupId && obj.type !== "group")
.map((obj) => {
const groupObject = objects.find((o) => o.id === obj.groupId);
if (!groupObject) return null;
// داده قدیمی/ناقص: 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}
/>
);
}
// Render with absolute position but wrapped in non-listening group
return (