Loading ...
Sorry, an error occurred while loading the content.

3544Footer/Header doesn't align with edge of panel

Expand Messages
  • Matt
    Aug 1, 2006
    • 0 Attachment
      Hi,

      I'm using the PhotoBox example to create an image panel. I'm running
      in to a problem where the hd/ft don't span the entire panel. I've been
      through the container, PhotoBox, and PanelEffect, but haven't figured
      out how to modify the header/footer to expand the entire panel. I've
      modified PhotoBox.js to resize the image to fit the panel, without
      distorting the image, but the rest of the code is untouched.

      YAHOO.widget.PhotoBox.prototype.configPhotos = function(type, args, obj) {
      var photos = args[0];

      if (photos) {
      this.images = new Array();

      if (! (photos instanceof Array)) {
      photos = [photos];
      }

      this.currentImage = 0;

      if (photos.length == 1) {
      this.footer.style.display = "none";
      }

      for (var p=0;p<photos.length;p++) {
      var photo = photos[p];
      var img = new Image();
      img.src = photo.src;
      img.title = photo.caption;
      img.id = this.id + "_img"

      // RESIZE THE PHOTOS IN THE PHOTO WINDOW HERE!
      if (img.width > img.height) {
      img.width = 615;

      if (img.height > 445) {
      img.height = 445;
      }
      } else {
      img.height = 445;

      if (img.width > 615) {
      img.width = 615;
      }
      }

      this.images[this.images.length] = img;
      }

      this.setImage(0);
      }

      }

      what am i doing wrong?

      thanks
      -matt
    • Show all 4 messages in this topic