Skip to content

Commit

Permalink
Don't allow placeholder to moves once we tap on it (#14066)
Browse files Browse the repository at this point in the history
  • Loading branch information
marecar3 authored and hypest committed Feb 23, 2019
1 parent 987a5a4 commit 67911a2
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions packages/block-library/src/image/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,14 +340,6 @@ class ImageEdit extends React.Component {
imageHeightWithinContainer,
} = sizes;

if ( imageWidthWithinContainer === undefined ) {
return (
<View style={ styles.imageContainer } >
<Dashicon icon={ 'format-image' } size={ 300 } />
</View>
);
}

let finalHeight = imageHeightWithinContainer;
if ( height > 0 && height < imageHeightWithinContainer ) {
finalHeight = height;
Expand All @@ -362,6 +354,9 @@ class ImageEdit extends React.Component {
<View style={ { flex: 1 } } >
{ getInspectorControls() }
{ getMediaOptions() }
{ ! imageWidthWithinContainer && <View style={ styles.imageContainer } >
<Dashicon icon={ 'format-image' } size={ 300 } />
</View> }
<ImageBackground
style={ { width: finalWidth, height: finalHeight, opacity } }
resizeMethod="scale"
Expand Down

0 comments on commit 67911a2

Please sign in to comment.