이미지 리사이즈 루틴이 특정 상황에서 문제를 일으키는 것을 해결.(1000x667사이즈, XE표준블로그 스킨 첨부시 늘어짐 현상)

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2490 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
venister 2007-09-04 10:13:31 +00:00
parent 85ead10900
commit 168a16deb9

View file

@ -200,9 +200,11 @@ function resizeImageContents() {
obj.source_height = orig_img.height;
if(obj_width >= parent_width) {
var per = parent_width/obj_width;
xWidth(obj, xWidth(parent)-1);
xHeight(obj, xHeight(obj)*per);
var new_w = xWidth(parent)-1;
var new_h = Math.round(xHeight(obj)*new_w/obj_width);
xWidth(obj, new_w);
xHeight(obj, new_h);
}
xAddEventListener(obj,"click", showOriginalImage);