Hello, i have this code for scale layer with the mouse wheel.
I would like the zoom to be performed at the point where the mouse is.
It should be considered that the zoomed layer is a child of another containing layer.
Can anyone advise me?
thank you
Code
<action name="ZoomImage_image_onmousewheel">
if(ZoomImage_iszoom,
if(ZoomImage_wheeldelta GT 0.0,
if(ZoomImage_startzoom,
set(ZoomImage_startzoom,false);
copy(ZoomImage_start_wheeldelta, ZoomImage_wheeldelta);
copy(ZoomImage_start_imagescale, get(layer[ZoomImage_].scale));
);
div(ZoomImage_tmp, ZoomImage_wheeldelta, ZoomImage_start_wheeldelta);
mul(layer[ZoomImage_].scale, ZoomImage_start_imagescale, ZoomImage_tmp);
,
mul(ZoomImage_sit,get(wheeldelta),0.09);
mul(ZoomImage_sit,layer[ZoomImage_].scale);
add(layer[ZoomImage_].scale,ZoomImage_sit);
);
);
</action>
Display More