Skip to content

Commit

Permalink
Merge pull request #68 from absurdprofit/development
Browse files Browse the repository at this point in the history
Set shared element clone margin to 0
  • Loading branch information
absurdprofit authored Sep 7, 2024
2 parents dc429ba + 9084cab commit f2a0328
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/SharedElementTransitionLayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ export class SharedElementTransitionLayer extends Component<SharedElementTransit
startClone.id = `${id}-start`;
startClone.style.position = "absolute";
startClone.style.gridArea = "1 / 1";
startClone.style.margin = "0";
this.copyStyles(start.ref.current?.firstElementChild, startClone, styleList);
this.copyStyles(end.ref.current?.firstElementChild, endClone, styleList);
this.ref.current?.prepend(startClone);
Expand All @@ -209,6 +210,7 @@ export class SharedElementTransitionLayer extends Component<SharedElementTransit
endClone.id = `${id}${end.transitionType === "morph" ? '' : '-end'}`;
endClone.style.position = "absolute";
endClone.style.gridArea = "1 / 1";
endClone.style.margin = "0";
this.ref.current?.prepend(endClone);
start.hide();
end.hide();
Expand Down

0 comments on commit f2a0328

Please sign in to comment.