Skip to content

Commit

Permalink
Add 100% control, adjust logic
Browse files Browse the repository at this point in the history
  • Loading branch information
richtabor committed Feb 8, 2024
1 parent decf5cd commit b54324a
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions packages/editor/src/components/preview-dropdown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,7 @@ export default function PreviewDropdown( { forceIsAutosaveable, disabled } ) {
setDeviceType( 'Desktop' );
__unstableSetEditorMode( 'edit' );
} }
icon={
deviceType === 'Desktop' &&
! isZoomedOutView &&
check
}
icon={ deviceType === 'Desktop' && check }
>
{ __( 'Desktop' ) }
</MenuItem>
Expand Down Expand Up @@ -134,9 +130,16 @@ export default function PreviewDropdown( { forceIsAutosaveable, disabled } ) {
<MenuItem
onClick={ () => {
setDeviceType( 'Desktop' );
__unstableSetEditorMode(
isZoomedOutView ? 'edit' : 'zoom-out'
);
__unstableSetEditorMode( 'edit' );
} }
icon={ ! isZoomedOutView && check }
>
{ __( 'Zoom to 100%' ) }
</MenuItem>
<MenuItem
onClick={ () => {
setDeviceType( 'Desktop' );
__unstableSetEditorMode( 'zoom-out' );
} }
icon={ isZoomedOutView && check }
>
Expand Down

0 comments on commit b54324a

Please sign in to comment.