Skip to content

Commit

Permalink
fix: floating molecule position
Browse files Browse the repository at this point in the history
  • Loading branch information
hamed-musallam committed Jan 30, 2025
1 parent 3b32eb3 commit e3e1926
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,12 @@ export function DraggableStructure(props: DraggableStructureProps) {
if (!viewerRef) return null;

if (isExportProcessStart) {
const { width, height } = moleculeView.floating.bounding;
return <DraggableMolecule {...{ width, height }} {...props} />;
const { width, height, x, y } = moleculeView.floating.bounding;
return (
<g transform={`translate(${x} ${y})`}>
<DraggableMolecule {...{ width, height }} {...props} />
</g>
);
}

return (
Expand Down

0 comments on commit e3e1926

Please sign in to comment.