File tree 1 file changed +5
-5
lines changed
src/react-chayns-gallery/component
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -87,21 +87,21 @@ export default class Gallery extends Component {
87
87
{
88
88
urls . map ( ( url , index ) => {
89
89
if ( index <= 3 || deleteMode ) {
90
- let scaleHeight = 150 ;
90
+ let shortEdge = window . innerWidth ;
91
91
if ( ! deleteMode ) {
92
92
if ( index <= 2 && numberOfImages <= 2 ) {
93
- scaleHeight = styleHeight ;
93
+ shortEdge = styleHeight ;
94
94
} else if ( index === 0 ) {
95
- scaleHeight = parseInt ( ( styleHeight * 2 ) / 3 , 10 ) ;
95
+ shortEdge = parseInt ( ( styleHeight * 2 ) / 3 , 10 ) ;
96
96
} else if ( index < 4 ) {
97
- scaleHeight = parseInt ( styleHeight / 3 , 10 ) ;
97
+ shortEdge = parseInt ( styleHeight / 3 , 10 ) ;
98
98
}
99
99
}
100
100
101
101
return (
102
102
< ImageContainer
103
103
key = { url }
104
- url = { Gallery . getScaledImageUrl ( url , scaleHeight ) }
104
+ url = { Gallery . getScaledImageUrl ( url , shortEdge ) }
105
105
index = { index }
106
106
openImage = { this . openGallery }
107
107
onDelete = { onDelete }
You can’t perform that action at this time.
0 commit comments