帝国CMS程序安装头像裁切插件,帝国CMS怎么实现头像裁切功能(3)

法律法规网 作者:小柯
来源 来源: 网络  法律法规网 时间: 2014-01-22 10:26:01  评论(/)

       // Store the API in the jcrop_api variable
       jcrop_api = this;
       jcrop_api.animateTo([boundx/2-50,boundy/2+50,boundx/2+50,boundy/2-50]);
       
     });
     function updatePreview(c)
     {
       if (parseInt(c.w) > 0)
       {
         var rx = 100 / c.w;
         var ry = 100 / c.h;
         $('#x1').val(c.x);
         $('#y1').val(c.y);
         $('#w').val(c.w);
         $('#h').val(c.h);
       
         $('#preview').css({
           width: Math.round(rx * boundx) + 'px',
           height: Math.round(ry * boundy) + 'px',
           marginLeft: '-' + Math.round(rx * c.x) + 'px',
           marginTop: '-' + Math.round(ry * c.y) + 'px'
         });
       
       }
     };
   }
   
   function show()
tags:

站长推荐 / Recommend

最近更新 / Latest

站长推荐:

网站首页 关于我们 友情链接 广告服务 联系我们 网站地图 免责声明 WAP
Powered by LC123.NET 8.5  © 2009-2015
本站常年法律顾问 王正兴 律师