I am using a repeater based on the template with the kitten pictures. The repeater is to be used to provide cut out information for various connectors used in the electronics industry. Each line in the repeater has a GIF, which is a thumbnail of the relevant connector. The problem I am encountering is that the GIF’s are different rectangular sizes based on the shape of connector being referred to, and some are getting cropped. It would appear everything is determined by the size of the gif used in the repeater’s master in the editor, and if GIFs are bigger than that, they get cropped. Now some might say why not use the biggest connector as the master, however, that would mean smaller connecters would have an awful lot of free space around them. I’m not so concerned about the horizontal space as that can be made quite large, but what I was hoping was that the vertical space would expand to accommodate the height of each gif. Would this have to be done with code?
I attach a screen grab to illustrate and item 044A shows the issue well.
TIA
Nigel
Try using the fitMode
#image1 - the image in the repeater
$item('#image1').fitMode = "fixedWidth"
Please paste this code in your repeater’s onItemReady or forEachItem
Great! Many thanks Ajit, I’ve just done a quick test and it looks like that could solve the problem.
Hi Anjit, a supplementary question. I don’t suppose there is any way of controlling, where the text appears vertically relative to the JPG? Below is the repeater in the editor, then after that the preview. I presume the repeater puts the jpg in and pushes the bottom of the container down to accommodate the jpg size? Ideally I’d like the text to line up with the centre line of the jpg, however, I suspect that may be asking rather a lot.
TIA
Nigel