fix: export grouped elements

This commit is contained in:
Konstantinos Kaloutas
2023-04-24 10:45:55 +03:00
committed by Tienson Qin
parent fd375dde5d
commit c204bce3d4

View File

@@ -38,10 +38,14 @@ export const Shape = observer(function Shape({
} = shape
const app = useApp<Shape>()
const events = useShapeEvents(shape)
const parentGroup = app.getParentGroup(shape)
const isParentGrpupSelected = app.selectedIds.has(parentGroup?.id)
const ignoreExport = !isSelected && !isParentGrpupSelected && app.selectedShapes.size !== 0 || null
return (
<Container
data-shape-id={shape.id}
data-html2canvas-ignore={(!isSelected && app.selectedShapes.size !== 0) || null}
data-html2canvas-ignore={ignoreExport}
zIndex={zIndex}
data-type="Shape"
bounds={bounds}