Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currenly height of gallery is always fixed and made according to height of first image with
<div class="gallery-slides" style="width: <?php print $gallery_slide_width; ?>px; height: <?php print $gallery_slide_height; ?>px;">
is it possible that we set this to be dynamic, so depending on height of image container is scaled then the gallery would be somthing like here.
http://ngm.nationalgeographic.com/ngm/photo-contest/2010/entries/gallery...
what do you think?
Comment | File | Size | Author |
---|---|---|---|
#6 | galleryformatter-1002094.patch | 1.52 KB | Manuel Garcia |
Comments
Comment #1
Marko B CreditAttribution: Marko B commentedI made it myself, wasnt too hard. Edited galleryformater.js file with few lines of code, around 44 line and works nicely, maybe you can add this to some options if somebody wants to have it this way. Finally some good gallery for CCK without having to use views for this shoule be simple task.
Check out result here http://www.travelnut.me/cordoba
Comment #2
Manuel Garcia CreditAttribution: Manuel Garcia commentedFeature requests are made agaisnt the dev version of the module ;)
The propposed solution has the following problems that I can see;
$slideContainer.css("height",$hash.find('img').height());
$slideContainer.css("height", $slideToShow.find('img').height());
after activating the thumbnail, within the
if ($locationHash) {
statement.At the moment I'm very reluctant to fill this request, mainly because of UX issues. I think the thumbnails should stay put, and not make the user have to hunt for them every time the height changes.
I set the status to needs work in case someone knows how to tackle the UX problem. The rest of the problems could be fixed easily.
Comment #3
Manuel Garcia CreditAttribution: Manuel Garcia commentedAnother option would be to set the height to the heighest of all images, but well, it's heavy on the CPU on load I bet, and stil looks ugly:
Comment #4
Marko B CreditAttribution: Marko B commentedOne solution for UX could be to to put tumbs on the top of the gallery. Also if you are talking about UX, then you also have to think about what user will see, either very small portrait oriented image, or just a part of it. This is also an issue, if not even bigger than jumping tumbs :-)
Comment #5
Manuel Garcia CreditAttribution: Manuel Garcia commentedLet's try tackling this once and for all, starting in the 7.x-1-x branch
Comment #6
Manuel Garcia CreditAttribution: Manuel Garcia commentedHere is a patch for 7.x branch. It implements what we discused in #1 and #2
Please test it out, and let's see if we can find a decent UI experience while allowing portrait slides.
Perhaps we should move the thumbnails slider to the top - of course you can already do that in your own tpl file quite easily. Only the default greenarrows style would need some tweaking....
Comment #7
Manuel Garcia CreditAttribution: Manuel Garcia commentedCommitted to 7.x-1.x
Comment #8
kazah CreditAttribution: kazah commentedHow can I resize my fotos not only by height, but also by width the same time? Dynamic resize by width and height?
Comment #10
donquixote CreditAttribution: donquixote commentedCurrently when loading the slideshow, the height of the first image is not determined.
The result is a container with no height at all.
Comment #11
donquixote CreditAttribution: donquixote commentedHere is the simple solution:
Comment #12
donquixote CreditAttribution: donquixote commentedBetter off in a separate issue,
#1678762: Height of first slide not determined - collapse to zero