Skip to content

Commit

Permalink
Fix issue where the toolbar can be hidden for the block after a wide …
Browse files Browse the repository at this point in the history
…aligned image (#16530)
  • Loading branch information
youknowriad authored Jul 11, 2019
1 parent 4bd0556 commit 6860857
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ function useMovingAnimation( ref, isSelected, enableAnimation, triggerAnimationO
x: previous ? previous.left - destination.left : 0,
y: previous ? previous.top - destination.top : 0,
};
ref.current.style.transform = `translate3d(${ newTransform.x }px,${ newTransform.y }px,0)`;
ref.current.style.transform = newTransform.x === 0 && newTransform.y === 0 ?
undefined :
`translate3d(${ newTransform.x }px,${ newTransform.y }px,0)`;
setResetAnimation( true );
setTransform( newTransform );
}, [ triggerAnimationOnChange ] );
Expand Down

0 comments on commit 6860857

Please sign in to comment.