Sam
10-01-2003, 04:01 PM
As the title sugests, I've got a bit of a question. I've got a img who's dimmensions are equal to document.body.clientHeight by document.body.clientWidth
My problem is this... I i'm trying to write a click&zoom script. (when a user clicks, the picture is enlarged by 20%. This part isn't very hard, I just multiply the height and width of the image by 1.2 (The image is in a div with overflow hidden, so it always fits in exactly one page...)
My question is this...
How can I make it so the point clicked is in the center of the picture in the enlarged screen...This really doesn't seem to pose a problem as far as the coding, but I haven't been able to figure it out mathematically
My problem is this... I i'm trying to write a click&zoom script. (when a user clicks, the picture is enlarged by 20%. This part isn't very hard, I just multiply the height and width of the image by 1.2 (The image is in a div with overflow hidden, so it always fits in exactly one page...)
My question is this...
How can I make it so the point clicked is in the center of the picture in the enlarged screen...This really doesn't seem to pose a problem as far as the coding, but I haven't been able to figure it out mathematically