Hi, i have found this zoom function which zooms into the screen when you double click anywhere in a document and zooms out again on the next double click. Any idea how i could modify it to zoom into where the mouse currently is or to zoom in to a layer on the document?
function ZOOM()
{
if (document.body && document.body.style && typeof document.body.style.zoom != "undefined")
{
if (document.body.style.zoom=="400%")
document.body.style.zoom = "100%";
else
{
document.body.style.zoom = "400%";
//alert('You\'ve doubleclicked on the document.\nDoubleclick again to unzoom.');
}
}
}
document.ondblclick=ZOOM;
Kind Regards.
function ZOOM()
{
if (document.body && document.body.style && typeof document.body.style.zoom != "undefined")
{
if (document.body.style.zoom=="400%")
document.body.style.zoom = "100%";
else
{
document.body.style.zoom = "400%";
//alert('You\'ve doubleclicked on the document.\nDoubleclick again to unzoom.');
}
}
}
document.ondblclick=ZOOM;
Kind Regards.