Skip to content

Commit

Permalink
Fix relative propagation (#2080)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgperry committed Apr 11, 2023
1 parent d07f20f commit d360b27
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,7 @@ export function createProjectionNode<I>({
this.layout.layoutBox,
relativeParent.layout.layoutBox
)

copyBoxInto(this.relativeTarget, this.relativeTargetOrigin)
} else {
this.relativeParent = this.relativeTarget = undefined
Expand Down Expand Up @@ -1393,6 +1394,8 @@ export function createProjectionNode<I>({
* projection not dirty.
*/
if (
// TODO: Ideally we would be able to improve optimisations by removing this line
!this.relativeParent.isProjectionDirty &&
prevRelativeTarget &&
boxEquals(this.relativeTarget, prevRelativeTarget)
) {
Expand Down Expand Up @@ -1446,7 +1449,6 @@ export function createProjectionNode<I>({

this.currentAnimation = animateSingleValue(0, animationTarget, {
...(options as any),
// keyframes: [0, animationTarget],÷
onUpdate: (latest: number) => {
this.mixTargetDelta(latest)
options.onUpdate && options.onUpdate(latest)
Expand Down

0 comments on commit d360b27

Please sign in to comment.