Team:Buenos Aires/Pruebas
From 2013.igem.org
(Difference between revisions)
Line 318: | Line 318: | ||
i_w = $img.width(), | i_w = $img.width(), | ||
i_h = $img.height(), | i_h = $img.height(), | ||
- | r_i = | + | r_i = i_h / i_w, |
new_w,new_h, | new_w,new_h, | ||
new_left,new_top; | new_left,new_top; | ||
- | + | if(r_w > r_i){ | |
- | + | new_h = w_h; | |
- | + | new_w = w_h / r_i; | |
+ | } | ||
+ | else{ | ||
+ | new_h = w_w * r_i; | ||
+ | new_w = w_w; | ||
+ | } | ||
$img.css({ | $img.css({ |
Revision as of 00:23, 27 May 2013