Closed YuiZhou closed 7 years ago
It is very important to know the aspect ratio of the images. This is how the algorithm determines how the layout the boxes. If you have a database you can store them there, or you could hardcode them. Or use something like this. Although I use the first approach.
@alex4o thanks for your update, I comprehensive this point after looking into the code and some other introduction. 😄 And your suggestion link looks so interesting that it is worth a try 😃
I have several images to show, which are in different size. I specific the image size like the following code, so that my image can auto resize.
However, the waterfall-slot needs to specific the width and height, I think noting all image's height and width is stupid and difficult in maintaining. So I just want to let the width is 200px, but the height is auto.
How should I specific the width and height parameter in this scenario?