I'm trying to keep my images the same height in order to stay as large as possible in the screen.

I set my imagecache preset height to 570px and disable resizing so that the image height fills the window on my computer. This works fine in the slidebox mode, but when I turn on slideshow mode, the window shrinks about 50px. It seems like slideshow mode ignores the resizing disable setting.

Obviously, it slideshow needs shrink about 25px compared with slidebox to make room for the slideshow pause and play buttons (although personally, I'd prefer those buttons to line up next to the next button like a control panel on a CD player).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tstermitz’s picture

Here is the lightbox.js code (about line 400) that causes this behavior:

      if (Lightbox.disableResize && !Lightbox.isSlideshow) {
        zoomIn = true;
      }

When I delete the "&& !Lightbox.isSlideshow", then my slideshow stays the same size as slidebox. I guess this behavior is "by design", but I'm not sure why that is preferred.

tstermitz’s picture

Incidently, here is how to move the "pause" and "play" buttons up next to the "next" button.

In the lightbox.js file, the pause and play need to be moved out of the image details div, and into the image data div:

    $("body").append(output);
    $('#outerImageContainer').append(modal + frame + imageContainer + loading);
    if (!s.use_alt_layout) {
      $('#imageContainer').append(image + hoverNav);
      $('#imageData').append(frameNav + details + bottomNav);
      $('#imageDetails').append(caption + numberDisplay);
      $('#bottomNav').append(close + zoom + zoomOut + pause + play);
    }
    else {
      $('#outerImageContainer').append(bottomNav);
      $('#imageContainer').append(image);
      $('#bottomNav').append(close + zoom + zoomOut);
      //TAS MODS: move " + pause + play" from #imageDetails to #imageData also, remove " + numberDisplay" from ImageDetail
      $('#imageData').append(hoverNav + details + pause + play);
      $('#imageDetails').append(caption);
    }

I removed numberDisplay brute-force because the div leaves a space even when no numbers are to be displayed. There's probably a better way....

I also had to add a "float: left;" to the image details block in lightbox_alt.css like so:

#imageData #imageDetails {
  float: left;
  width: 80%;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
  border: 1px solid #fff;
}
James Andres’s picture

Version: 6.x-1.9 » master
FileSize
516 bytes

Here is a patch that applies the change suggested in comment #1. A patch is better, at least, than people manually hacking the module code.