Skip to content

Commit

Permalink
Only show the column slider if there is more then 1 image.
Browse files Browse the repository at this point in the history
  • Loading branch information
Soean authored and youknowriad committed Nov 3, 2017
1 parent 06030ba commit 4da6c0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blocks/library/gallery/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,13 @@ class GalleryBlock extends Component {
<InspectorControls key="inspector">
{blockDescription}
<h3>{ __( 'Gallery Settings' ) }</h3>
<RangeControl
{ images.length > 1 && <RangeControl
label={ __( 'Columns' ) }
value={ columns }
onChange={ this.setColumnsNumber }
min={ 1 }
max={ Math.min( MAX_COLUMNS, images.length ) }
/>
/> }
<ToggleControl
label={ __( 'Crop Images' ) }
checked={ !! imageCrop }
Expand Down

0 comments on commit 4da6c0f

Please sign in to comment.