Fix cys frame zooming in/out while moving mouse over

This commit is contained in:
Chi-Hsuan Huang 2023-11-03 13:57:41 +08:00
parent d2cd2ff35a
commit 54d3394ac4
2 changed files with 8 additions and 21 deletions

View File

@ -145,35 +145,15 @@ export const Layout = () => {
</NavigableRegion>
{ ! isMobileViewport && (
<div
className={ classnames(
'edit-site-layout__canvas-container'
) }
>
<div className="edit-site-layout__canvas-container">
{ canvasResizer }
{ !! canvasSize.width && (
<motion.div
whileHover={ {
scale: 1.005,
transition: {
duration: disableMotion
? 0
: 0.5,
ease: 'easeOut',
},
} }
initial={ false }
layout="position"
className={ classnames(
'edit-site-layout__canvas'
) }
transition={ {
type: 'tween',
duration: disableMotion
? 0
: ANIMATION_DURATION,
ease: 'easeOut',
} }
>
<ErrorBoundary>
<ResizableFrame

View File

@ -244,6 +244,13 @@ function ResizableFrame( {
if ( definition === 'fullWidth' )
setFrameSize( { width: '100%', height: '100%' } );
} }
whileHover={ {
scale: 1.005,
transition: {
duration: 0.5,
ease: 'easeOut',
},
} }
transition={ frameTransition }
size={ frameSize }
enable={ {