点击回首页
我的浏览记录 | | 帮助?
当前位置:
首页>> 企业应用>> 新翔网络OA系统V1.0>> 源文件浏览
[商业版 200RMB] WebForm,下载次数:1 次 | 关键字: PHP MYSQL OA 办公 网络办公

源码截图

源码目录树

;
当前路径:static/jq-module/zyupload/zyupload-1.0.0.min.js
(function($){$.Jcrop=function(obj,opt){var obj=obj,opt=opt;if(typeof(obj)!=="object"){obj=$(obj)[0]}if(typeof(opt)!=="object"){opt={}}if(!("trackDocument" in opt)){opt.trackDocument=$.browser.msie?false:true;if($.browser.msie&&$.browser.version.split(".")[0]=="8"){opt.trackDocument=true}}if(!("keySupport" in opt)){opt.keySupport=$.browser.msie?false:true}var defaults={trackDocument:false,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:0.6,borderOpacity:0.4,handleOpacity:0.5,handlePad:5,handleSize:9,handleOffset:5,edgeMargin:14,aspectRatio:0,keySupport:true,cornerHandles:true,sideHandles:true,drawBorders:true,dragEdges:true,boxWidth:0,boxHeight:0,boundary:8,animationDelay:20,swingSpeed:3,allowSelect:true,allowMove:true,allowResize:true,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){}};var options=defaults;setOptions(opt);var $origimg=$(obj);var $img=$origimg.clone().removeAttr("id").css({position:"absolute"});$img.width($origimg.width());$img.height($origimg.height());$origimg.after($img).hide();presize($img,options.boxWidth,options.boxHeight);var boundx=$img.width(),boundy=$img.height(),$div=$("<div />").width(boundx).height(boundy).addClass(cssClass("holder")).css({position:"relative",backgroundColor:options.bgColor}).insertAfter($origimg).append($img);if(options.addClass){$div.addClass(options.addClass)}var $img2=$("<img />").attr("src",$img.attr("src")).css("position","absolute").width(boundx).height(boundy);var $img_holder=$("<div />").width(pct(100)).height(pct(100)).css({zIndex:310,position:"absolute",overflow:"hidden"}).append($img2);var $hdl_holder=$("<div />").width(pct(100)).height(pct(100)).css("zIndex",320);var $sel=$("<div />").css({position:"absolute",zIndex:300}).insertBefore($img).append($img_holder,$hdl_holder);var bound=options.boundary;var $trk=newTracker().width(boundx+(bound*2)).height(boundy+(bound*2)).css({position:"absolute",top:px(-bound),left:px(-bound),zIndex:290}).mousedown(newSelection);var xlimit,ylimit,xmin,ymin;
var xscale,yscale,enabled=true;var docOffset=getPos($img),btndown,lastcurs,dimmed,animating,shift_down;var Coords=function(){var x1=0,y1=0,x2=0,y2=0,ox,oy;function setPressed(pos){var pos=rebound(pos);x2=x1=pos[0];y2=y1=pos[1]}function setCurrent(pos){var pos=rebound(pos);ox=pos[0]-x2;oy=pos[1]-y2;x2=pos[0];y2=pos[1]}function getOffset(){return[ox,oy]}function moveOffset(offset){var ox=offset[0],oy=offset[1];if(0>x1+ox){ox-=ox+x1}if(0>y1+oy){oy-=oy+y1}if(boundy<y2+oy){oy+=boundy-(y2+oy)}if(boundx<x2+ox){ox+=boundx-(x2+ox)}x1+=ox;x2+=ox;y1+=oy;y2+=oy}function getCorner(ord){var c=getFixed();switch(ord){case"ne":return[c.x2,c.y];case"nw":return[c.x,c.y];case"se":return[c.x2,c.y2];case"sw":return[c.x,c.y2]}}function getFixed(){if(!options.aspectRatio){return getRect()}var aspect=options.aspectRatio,min_x=options.minSize[0]/xscale,min_y=options.minSize[1]/yscale,max_x=options.maxSize[0]/xscale,max_y=options.maxSize[1]/yscale,rw=x2-x1,rh=y2-y1,rwa=Math.abs(rw),rha=Math.abs(rh),real_ratio=rwa/rha,xx,yy;if(max_x==0){max_x=boundx*10}if(max_y==0){max_y=boundy*10}if(real_ratio<aspect){yy=y2;w=rha*aspect;xx=rw<0?x1-w:w+x1;if(xx<0){xx=0;h=Math.abs((xx-x1)/aspect);yy=rh<0?y1-h:h+y1}else{if(xx>boundx){xx=boundx;h=Math.abs((xx-x1)/aspect);yy=rh<0?y1-h:h+y1}}}else{xx=x2;h=rwa/aspect;yy=rh<0?y1-h:y1+h;if(yy<0){yy=0;w=Math.abs((yy-y1)*aspect);xx=rw<0?x1-w:w+x1}else{if(yy>boundy){yy=boundy;w=Math.abs(yy-y1)*aspect;xx=rw<0?x1-w:w+x1}}}if(xx>x1){if(xx-x1<min_x){xx=x1+min_x}else{if(xx-x1>max_x){xx=x1+max_x}}if(yy>y1){yy=y1+(xx-x1)/aspect}else{yy=y1-(xx-x1)/aspect}}else{if(xx<x1){if(x1-xx<min_x){xx=x1-min_x}else{if(x1-xx>max_x){xx=x1-max_x}}if(yy>y1){yy=y1+(x1-xx)/aspect}else{yy=y1-(x1-xx)/aspect}}}if(xx<0){x1-=xx;xx=0}else{if(xx>boundx){x1-=xx-boundx;xx=boundx}}if(yy<0){y1-=yy;yy=0}else{if(yy>boundy){y1-=yy-boundy;yy=boundy}}return last=makeObj(flipCoords(x1,y1,xx,yy))}function rebound(p){if(p[0]<0){p[0]=0}if(p[1]<0){p[1]=0}if(p[0]>boundx){p[0]=boundx}if(p[1]>boundy){p[1]=boundy}return[p[0],p[1]]
}function flipCoords(x1,y1,x2,y2){var xa=x1,xb=x2,ya=y1,yb=y2;if(x2<x1){xa=x2;xb=x1}if(y2<y1){ya=y2;yb=y1}return[Math.round(xa),Math.round(ya),Math.round(xb),Math.round(yb)]}function getRect(){var xsize=x2-x1;var ysize=y2-y1;if(xlimit&&(Math.abs(xsize)>xlimit)){x2=(xsize>0)?(x1+xlimit):(x1-xlimit)}if(ylimit&&(Math.abs(ysize)>ylimit)){y2=(ysize>0)?(y1+ylimit):(y1-ylimit)}if(ymin&&(Math.abs(ysize)<ymin)){y2=(ysize>0)?(y1+ymin):(y1-ymin)}if(xmin&&(Math.abs(xsize)<xmin)){x2=(xsize>0)?(x1+xmin):(x1-xmin)}if(x1<0){x2-=x1;x1-=x1}if(y1<0){y2-=y1;y1-=y1}if(x2<0){x1-=x2;x2-=x2}if(y2<0){y1-=y2;y2-=y2}if(x2>boundx){var delta=x2-boundx;x1-=delta;x2-=delta}if(y2>boundy){var delta=y2-boundy;y1-=delta;y2-=delta}if(x1>boundx){var delta=x1-boundy;y2-=delta;y1-=delta}if(y1>boundy){var delta=y1-boundy;y2-=delta;y1-=delta}return makeObj(flipCoords(x1,y1,x2,y2))}function makeObj(a){return{x:a[0],y:a[1],x2:a[2],y2:a[3],w:a[2]-a[0],h:a[3]-a[1]}}return{flipCoords:flipCoords,setPressed:setPressed,setCurrent:setCurrent,getOffset:getOffset,moveOffset:moveOffset,getCorner:getCorner,getFixed:getFixed}}();var Selection=function(){var start,end,dragmode,awake,hdep=370;var borders={};var handle={};var seehandles=false;var hhs=options.handleOffset;if(options.drawBorders){borders={top:insertBorder("hline").css("top",$.browser.msie?px(-1):px(0)),bottom:insertBorder("hline"),left:insertBorder("vline"),right:insertBorder("vline")}}if(options.dragEdges){handle.t=insertDragbar("n");handle.b=insertDragbar("s");handle.r=insertDragbar("e");handle.l=insertDragbar("w")}options.sideHandles&&createHandles(["n","s","e","w"]);options.cornerHandles&&createHandles(["sw","nw","ne","se"]);function insertBorder(type){var jq=$("<div />").css({position:"absolute",opacity:options.borderOpacity}).addClass(cssClass(type));$img_holder.append(jq);return jq}function dragDiv(ord,zi){var jq=$("<div />").mousedown(createDragger(ord)).css({cursor:ord+"-resize",position:"absolute",zIndex:zi});$hdl_holder.append(jq);return jq}function insertHandle(ord){return dragDiv(ord,hdep++).css({top:px(-hhs+1),left:px(-hhs+1),opacity:options.handleOpacity}).addClass(cssClass("handle"))
}function insertDragbar(ord){var s=options.handleSize,o=hhs,h=s,w=s,t=o,l=o;switch(ord){case"n":case"s":w=pct(100);break;case"e":case"w":h=pct(100);break}return dragDiv(ord,hdep++).width(w).height(h).css({top:px(-t+1),left:px(-l+1)})}function createHandles(li){for(i in li){handle[li[i]]=insertHandle(li[i])}}function moveHandles(c){var midvert=Math.round((c.h/2)-hhs),midhoriz=Math.round((c.w/2)-hhs),north=west=-hhs+1,east=c.w-hhs,south=c.h-hhs,x,y;"e" in handle&&handle.e.css({top:px(midvert),left:px(east)})&&handle.w.css({top:px(midvert)})&&handle.s.css({top:px(south),left:px(midhoriz)})&&handle.n.css({left:px(...
完整源码文件,请先购买后再查看
关于我们 | 顾问团队 | 发展历程 | 联系我们 | 源码上传
联系电话(Tel):4008-010-151(免长途)
地址:北京市海淀区大恒科技大厦五层 邮编:100080
Floor 5th,Daheng Building,Zhongguancun,Beijing,China,100080
51Aspx.com 版权所有 CopyRight © 2006-2022. 京ICP备09089570号 | 京公网安备11010702000869号