git-svn-id: http://xe-core.googlecode.com/svn/trunk@691 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-03-26 14:09:14 +00:00
parent 61b828a01c
commit e3f9c61d6e

View file

@ -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);