bonjour ,
je reposte car j'ai toujours des difficultés pour faire la fonction de zoom !
Vous m'avais aider a récupérer les coordonné du curseur que j'utilise dans la fonction "Zoomer" qui elle effectue le zoom mais j'ai du mal a coder cette fonction jai fait ca :
function zoomer(zoomx,min,PosCur)
{
if(document.getElementById)
{
zoom *= zoomx;
var X=(PosCur.x-5);
var Y=(PosCur.y-95);
if (zoom <min){zoom=min}
document.getElementById("module").style.height =zoom+'px';
if ((PosCur.x>10&&PosCur.x<680)&&(PosCur.y>100&&PosCur.y<580))
{
if (parseInt(document.getElementById("Box").style.height)<document.getElementById("module").height)
{
document.getElementById("module").style.top =((document.getElementById("module").height)/2)-Y/2+'px';
if (parseInt(document.getElementById("Box").style.width)<document.getElementById("module").width)
{
document.getElementById("module").style.left =((document.getElementById("module").width)/2)-X/2+'px';
}
}
}else
{
if (parseInt(document.getElementById("Box").style.height)<document.getElementById("module").height)
{
document.getElementById("module").style.top =(parseInt(document.getElementById("Box").style.height)-document.getElementById("module").height)/2+'px';
if (parseInt(document.getElementById("Box").style.width)<document.getElementById("module").width)
{
document.getElementById("module").style.left =(parseInt(document.getElementById("Box").style.width)-document.getElementById("module").width)/2+'px';
}
}
}
}
}
Quelq'un peux m'aider SVP
Merci .