1function resize($image){ 2 var textDescriptHeight; 3 //use set minimum incase people type a novel! 4 if ($('#image_text').height() < 90) 5 { 6 if ($('#image_text').height() < 50) { 7 textDescriptHeight = 50; 8 } else { 9 textDescriptHeight = $('#image_text').height(); 10 } 11 } else { 12 textDescriptHeight = 90; 13 } 14 var windowH = $(window).height()-($('#holyheader').height()+parseInt($("#holycenter").css('margin-top'))+paddingbottom); 15 var windowW = $("#holycenter").width(); 16 var theImage = new Image(); 17 theImage.src = $image.attr("src"); 18 var imgwidth = theImage.width; 19 var imgheight = theImage.height; 20 21 //catch bug. Keep running until image is loaded into DOM 22 if (imgwidth == 0 || imgheight == 0) 23 { 24 setTimeout(function() { resize($image); }, 1000); 25 } 26 27 //set a minimum resize size, otherwise it can become negative with the subtraction in "var windowH" above 28 if (windowH < 100){ 29 windowH = 100; 30 } 31 if (windowW < 100){ 32 windowW = 100; 33 } 34 35 36 if((imgwidth > windowW)||(imgheight > windowH)){ 37 if(imgwidth > imgheight){ 38 var newwidth = windowW; 39 var ratio = imgwidth / windowW; 40 var newheight = imgheight / ratio; 41 theImage.height = newheight; 42 theImage.width= newwidth; 43 if(newheight>windowH){ 44 var newnewheight = windowH; 45 var newratio = newheight/windowH; 46 var newnewwidth =newwidth/newratio; 47 theImage.width = newnewwidth; 48 theImage.height= newnewheight; 49 } 50 } 51 else{ 52 var newheight = windowH; 53 var ratio = imgheight / windowH; 54 var newwidth = imgwidth / ratio; 55 theImage.height = newheight; 56 theImage.width= newwidth; 57 if(newwidth>windowW){ 58 var newnewwidth = windowW; 59 var newratio = newwidth/windowW; 60 var newnewheight =newheight/newratio; 61 theImage.height = newnewheight; 62 theImage.width= newnewwidth; 63 } 64 } 65 } 66 $image.css({'width':theImage.width+'px','height':theImage.height+'px'}); 67 //Print for testing 68 //$('.image_title').html('windowW '+windowW+' x imageWidth'+theImage.width); 69}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.