# HG changeset patch # User Atul Varma # Date 1260580552 28800 # Node ID 124129f5c74afeaef379c279453ab9c2d708f6e0 # Parent a0434105940dd6fe8f2676a68d8898aa54cb9321 better width determination for #big-picture. diff -r a0434105940d -r 124129f5c74a mbp.css --- 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; -} diff -r a0434105940d -r 124129f5c74a mbp.js --- 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();