Mercurial > mozilla-the-big-picture
changeset 40:124129f5c74a
better width determination for #big-picture.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Fri, 11 Dec 2009 17:15:52 -0800 |
parents | a0434105940d |
children | f051531224a4 |
files | mbp.css mbp.js |
diffstat | 2 files changed, 4 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mbp.css Fri Dec 11 16:35:00 2009 -0800 +++ b/mbp.css Fri Dec 11 17:15:52 2009 -0800 @@ -64,7 +64,3 @@ padding-top: 4pt; text-align: center; } - -#big-picture img { - max-width: 560pt; -}
--- a/mbp.js Fri Dec 11 16:35:00 2009 -0800 +++ b/mbp.js Fri Dec 11 17:15:52 2009 -0800 @@ -78,10 +78,10 @@ crop.height = crop.bottom - crop.top; var canvas = document.createElement("canvas"); var self = $(this.parentNode).clone(); - - // Allow max-width/max-height of CSS to propagate. - self.find("img").removeAttr("width").removeAttr("height"); - + var maxWidth = Math.max($(document.body).width(), containerWidth); + self.find("img").removeAttr("width") + .removeAttr("height") + .css({maxWidth: maxWidth}); $(canvas).mouseenter( function() { $("#big-picture").empty();