Not signed in (Sign In)

Categories

Welcome, Guest

Want to take part in these discussions? If you have an account, sign in now.

If you don't have an account, apply for one now.

Links

Vanilla 1.0.1 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorRyan
    • CommentTimeAug 7th 2006
     
    I'd like to know if it is possible to prevent Thickbox from resizing the image to fit the browser view area? I'd like it to be fully viewable.

    Thanks.
    • CommentAuthorcodylindley
    • CommentTimeAug 7th 2006 edited
     
    Sure...

    in the thickbox.js file remove this:


    var pagesize = TB_getPageSize();
    var x = pagesize[0] - 150;
    var y = pagesize[1] - 150;
    var imageWidth = imgPreloader.width;
    var imageHeight = imgPreloader.height;
    if (imageWidth > x) {
    imageHeight = imageHeight * (x / imageWidth);
    imageWidth = x;
    if (imageHeight > y) {
    imageWidth = imageWidth * (y / imageHeight);
    imageHeight = y;
    }
    } else if (imageHeight > y) {
    imageWidth = imageWidth * (y / imageHeight);
    imageHeight = y;
    if (imageWidth > x) {
    imageHeight = imageHeight * (x / imageWidth);
    imageWidth = x;
    }
    }


    and replace it with:

    var imageWidth = imgPreloader.width;
    var imageHeight = imgPreloader.height;


    Let me know if that works...
    • CommentAuthorano
    • CommentTimeAug 15th 2006 edited
     
    Hi, I actually tried this, but it seems to be making some fun with me..

    Here's an example of what happens..

    http://qill.net/private/images/js_example.png (notice, resized from 1920x1200)

    And to sum up what it actually did/didn't..

    - It did not resize, which is good.
    - It did make "unlimited" scrolling possible (you can keep scrolling down when the picture is open).
    - You can't see the close button. (I don't know if this is only an issue at my computer).

    * Notice * Same issue in IE.

    * Update * When resizing the browser window and clicking on the link again, I can actually only see a part of the image, and not scroll anyways in the picture, only the background.. :)

    You can see the exmaple used here: http://qill.net/dotano
  1.  
    Yup, if you remove the code I mentioned and the browser is not big enough to view the entire image...then it will function like the example you showed. The exact point of the resize code is to avoid the possibility of an image being bigger than the browser window. Because, if it is...then you will not see the close button due to the fact that the thickbox is re-positioning itself when the scrollbar is used.
    • CommentAuthorano
    • CommentTimeAug 16th 2006
     
    So if you don't want the resize function, there's now possibilities of getting the images shown correctly? :/
    • CommentAuthorSandy
    • CommentTimeAug 17th 2006 edited
     
    In the javascript there is a function to work out how far down the page you have scrolled, and work out how far down the scrolled page to place the image so it appears in the viewers display. Basically I did the change codylindley suggested, and additionally then fixed the top of the view to be absolute (i.e the image is always put at the top of the html page, so if you scroll down an article and click on an image you may not see it until you scroll back up the page).

    This would be ok for an idealistic blog or fixed height layout etc, but unfortunately the site I was doing this for was an ecommerce site and needed good usability so I binned these changes and went back to the default behaviour, even though large resized images look ass.

    I still cannot get the AJAX content to work in thickbox 2.0 in either IE or Firefox. Thickbox isn't the problem its the Jquery alpha build (Spins thumbs and hopes for a new jquery build).
    • CommentAuthoryoupii
    • CommentTimeAug 19th 2006
     
    You can add a keyboard shortcut to close the window (eg: 'esc').

    About the resize, not resize ... maybe Thickbox should add a button to show the picture was resised (if it was) then if the user clicks on that button show the picture fullscreen with scrolling ability.
  2.  
    @youpii - You should add those ideas to the feature request category.
  3.  

    ...and additionally then fixed the top of the view to be absolute (i.e the image is always put at the top of the html page, so if you scroll down an article and click on an image you may not see it until you scroll back up the page).


    Sandy, can you please tell me exactly what code (css maybe?) you changed. I'm having a similar issue. I'm using thickbox to launch an iframe.

    If my browser window is smaller than the dimensions of my site when I launch the thickbox, and then use the vertical browser scroll, the browser scrolls infinitely to the bottom. Also if I use the horizontal scroll there's a portion of the main browser that's not overlaid by thickbox (i.e. I can see the parent page that launched the thickbox)

    I was also curious, so I checked cody's demo page for thickbox. Specifically, I launched the iframe demo. Before launching, I shrunk the browser window to a small enough size (so that I can sroll the browser vertically and horizontally). It does the same thing. Help please.

    Here's my site ... http://www.theomotoshos.com/test/
    • CommentAuthorethodaddy
    • CommentTimeSep 1st 2006
     
    not thickbox related:

    @supermandru, i like where the design is going. pretty spiffy feel to it. *thumbs up*
  4.  
    @supermandru - Nice work...first off. Second, the new version of thickbox coming soon will fix the horizontal scroll issue where the overlay stops. The new version will allow for horizontal scrolling and ThickBox usage.

    The endless scroll only occurs in FF, correct?
  5.  
    Thanks for the compliment guys, I've looked at the site so much that I just wanna get it done ;-p. Anyways, the endless scroll actually occurs in both FF and IE. My version of both browsers are below:

    IE: ver. 6.0.2990
    FF: ver 1.5.0.6

    Any help would be appreciated
    • CommentAuthorfiliford
    • CommentTimeJun 29th 2007
     
    I'd like to add to the discussion:

    * If any resizing should be made - it must look good in all browsers!
    * Let image resizing be turned off as a default.

    Image resizing only looks good on a Mac today. That's not good enough. Jagged photos/illustrations for me is worse than no image at all! For all us image-nerds, it is crucial that the image appears the way we want it to. Not the way the visitor wants it to appear. Leave responsibility of a smart browsing experience to the designer...

    Thanks for a smart hack! Not all the way there yet in my opinion.

    /Filiford