From e3f9c61d6e0dbc8ef700cf0f63a11608b066d4c3 Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 26 Mar 2007 14:09:14 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@691 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- common/js/common.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/common/js/common.js b/common/js/common.js index 11e1ff269..60211d109 100644 --- a/common/js/common.js +++ b/common/js/common.js @@ -200,7 +200,12 @@ function showOriginalImage(evt) { var src = obj.src; var orig_image = xGetElementById("fororiginalimage"); + var tmp_image = new Image(); + tmp_image.src = src; + orig_image.style.position = "absolute"; + orig_image.style.margin = "0px 0px 0px 0px"; + orig_image.style.cursor = "pointer"; orig_image.src = src; var area = xGetElementById("fororiginalimagearea"); @@ -213,19 +218,14 @@ function showOriginalImage(evt) { var area_width = xWidth(area); var area_height = xHeight(area); - var image_width = orig_image.width; - var image_height = orig_image.height; + var image_width = tmp_image.width; + var image_height = tmp_image.height; var x = parseInt((area_width-image_width)/2,10); var y = parseInt((area_height-image_height)/2,10); if(x<0) x = 0; if(y<0) y = 0; - orig_image.style.position = "absolute"; - orig_image.style.left = "0px"; - orig_image.style.top = "0px"; - orig_image.style.margin = "0px 0px 0px 0px"; - orig_image.style.cursor = "pointer"; xLeft(orig_image, x); xTop(orig_image, y);