diff --git a/addons/resize_image/js/resize_image.js b/addons/resize_image/js/resize_image.js index 77dc3f8d6..88ee8b0ba 100644 --- a/addons/resize_image/js/resize_image.js +++ b/addons/resize_image/js/resize_image.js @@ -98,7 +98,8 @@ function getScreen() { ; // 이미지 홀더 - imgframe = $("") + imgframe = $(new Image()); + imgframe .attr("id", "xe_gallery_holder") .css({ border: '5px solid white', @@ -111,6 +112,15 @@ function getScreen() { body.append(xScreen).append(controls); + imgframe.live('load', function(){ + var clientWidth = $(window).width(); + var clientHeight = $(window).height(); + imgframe.css({ + left : clientWidth/2 - imgframe.width()/2 + "px", + top : clientHeight/2 - imgframe.height()/2 + "px" + }); + }); + // xScreen 객체를 확장한다. xScreen.xeShow = function() { var clientWidth = $(window).width(); @@ -140,13 +150,18 @@ function getScreen() { this.index += val; prevbtn.css("visibility", (this.index>0)?"visible":"hidden"); nextbtn.css("visibility", (this.index 0) { + imgframe.css({ + left : clientWidth/2 - imgframe.width()/2 + "px", + top : clientHeight/2 - imgframe.height()/2 + "px" + }); + } + closebtn.css({ left : clientWidth/2 - 32 + "px", top : "10px"