ajsharma
05-28-2003, 01:38 AM
I want to give functionality of Zooming the image i.e when the user will drag his mouse over the image the selected area will be zoomed for him. Can anyone suggest me a solution..
|
Click to See Complete Forum and Search --> : Image Zoom ajsharma 05-28-2003, 01:38 AM I want to give functionality of Zooming the image i.e when the user will drag his mouse over the image the selected area will be zoomed for him. Can anyone suggest me a solution.. Nevermore 05-28-2003, 03:48 AM You would either need to use Flash or Java, neither of which am I familiar with. From the title of this thread I imagin you have heard of the program Image Zoom, which creates Java applets to allow zooming in on and rotating of images. ajsharma 05-28-2003, 04:38 AM Dear cijori ! Thanx for considering the thread. Actually what i need is zooming the selected map area on the website. I have written a DLL which can zoom the image but for that i require the starting XY coordinate and ending XY coordinates of selection. Can you suggest me some way by which i can get XY coordinates while dragging mouse on image. khalidali63 05-28-2003, 08:45 AM Suppose your image element has an id attribute say <imag id="img1" you can probably do this then var obj = document.getElementById("img1"); now you can get the Xand Y co-ords of the image with reference to its position in a given window. var imgX = obj.offsetLeft; var imgY = obj.offsetTop; once you have that now you want to get X and Y positions of your mouse which you can get in this way capture mousedown,mouseup and mousemove events var x = event.clientX var y = event.clientY and use pageX and pageY for netscape browsers. Once you have all the co-ords,you can (I hope) calculate the co-ords for image map zooming and use ur dll.. ajsharma 05-29-2003, 04:03 AM Dear Khalid ! Thanx a lot for your suggestion. Your suggestion has worked but it is giving me problem when the images are inserted into a column of a table, as it gives both offsetLeft and offsetTop as 0 in that case. Can you please suggest me any solution over that. Regards Ajay khalidali63 05-29-2003, 10:07 AM I think you can use a wrok around this crappy behaviour. giv an id attribute the external most table element and get the offsetLeft with reference to that element.you should be able to make it work that way...If you have any difficulties let me know. ajsharma 06-02-2003, 01:27 AM Dear Khalid ! Thanx a lot for providing the solution, the way around you told has really worked. Once again thanx a lot. Regards Ajay webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |