Hi,
I've looked for a simple cck imagefield gallery formater for quite some time now! This is great! Some more options or themes and this is a killer module. :-)
So to my problem. I'm adding some images of different width to my node. Depending on which I order I have them sorted in the gallery gets different widths! If I have a thin image first then I won't see the wider images in full. The width should be set to the widest image's width. Of course no problem if your images are of the same width.
Thanks again for a wonderful module!
MrVictor
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | Ivory puzzle ball | Lapidarius.png | 506.17 KB | antony.lovric |
| #6 | set_the_static_width_andor_height-872794.patch | 2.38 KB | tomhung |
Comments
Comment #1
MrVictor commentedI found I could easily set fixed values in the tpl.php-file to solve my problem. Not a great way but it works.
Comment #2
manuel garcia commentedYup, this is how it's supposed to work. Unfortunately in order to prevent this, we'd have to get every image's dimensions, figure out which one is the widest, and use that width. This would mean a lot more expensive processing, and is not something I'm willing to do because of this.
The way to work around it is how you did it, or setup your imagecache preset so they all get the same dimensions.
Comment #3
manuel garcia commentedComment #5
topdillon commentedGood idea. Here is another angle.
I know what my widest image width is, I set it to a maximum of 300px.
I don't know which image will be shown first, could be 200px, could be 300px.
So I should have an option to set it to a specific width, if I know what maximum width I want, which in my case I actually do.
Reasonable request?
Comment #6
tomhung commentedHere is my patch (7.x-1.0) to statically set the slide Width and/or Height. This is useful for cases where the images are mixed portrait and landscape and you don't want to crop.
Comment #7
nicxvan commentedTomhung I patched my gallery formatter and it works great now. Thanks
Comment #8
pbfleetwood commentedIs there any chance that the patch in #6 will be added to this module?
Comment #9
antony.lovric commentedI've encountered this same isue and wrote a small work-around in the .module file and the .css style.
In the .module code, around the '// Get the dimensions, and remove unfound files,' comment, I create local variables that represent the max height and width of the images that will be shown. (There is already code that iterates through and transforms the images in galleryformatter_getimage_dimensions)
Then in the style sheet I altered some components to have the alignment fixed so images in the slideshow are centered in the (now) larger preview area.
Here's a preview of the changes, originally the second image only displayed 189px wide (the width of the first);
Comment #10
knalstaaf commentedA quick workaround is adding the following code to a stylesheet of choice:
Comment #11
c470ip commented@antony.lovric
Perfect! Worked for me like a charm, thanks. Before that I had to manually set fixed thumbnail width in galleryformatter.js, though this led to distorted thumbnail carousel.
Comment #12
astonvictor commentedI'm closing it because the issue was created a long time ago without any further steps.
if you still need it then raise a new one.
thanks