首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

SVG脚本编程的一些技艺

2013-01-18 
SVG脚本编程的一些技巧function mousewheel(){origscaleroot.currentScaleorigscale event.wheelDelta

SVG脚本编程的一些技巧

function mousewheel()
{
origscale=root.currentScale;
origscale +=event.wheelDelta / 1200;
if (origscale > 0)
{
root.currentScale=origscale;
root.currentTranslate.x=midx*root.currentScale+event.offsetX*(1-root.currentScale/midscale);
root.currentTranslate.y=midy*root.currentScale+event.offsetY*(1-root.currentScale/midscale);

midscale=root.currentScale;
midx=root.currentTranslate.x/root.currentScale;
midy=root.currentTranslate.y/root.currentScale;
}
}

热点排行