FIX: merge bezier_signature
authorjohn@roojs.com <john@roojs.com>
Thu, 27 Dec 2018 08:13:28 +0000 (16:13 +0800)
committerjohn@roojs.com <john@roojs.com>
Thu, 27 Dec 2018 08:13:28 +0000 (16:13 +0800)
roojs-bootstrap-debug.js
roojs-bootstrap.js

index dd82b3b..1d33a0d 100644 (file)
@@ -41865,8 +41865,6 @@ Roo.extend(Roo.bootstrap.BezierSignature, Roo.bootstrap.Component,  {
         
         img.src = img_src;
         
         
         img.src = img_src;
         
-        Roo.log(img);
-        
         this.canvasElCtx().drawImage(img, 0, 0);
     },
     
         this.canvasElCtx().drawImage(img, 0, 0);
     },
     
index 8ed2747..a72d916 100644 (file)
@@ -1747,7 +1747,7 @@ var C=this.canvasElCtx();var D=B.endWidth-B.startWidth;var E=Math.floor(B.length
 x+=F*B.endPoint.x;var y=G*B.startPoint.y;y+=3*uu*t*B.control1.y;y+=3*u*tt*B.control2.y;y+=F*B.endPoint.y;var H=B.startWidth+F*D;this.drawCurveSegment(x,y,H);}C.closePath();C.fill();},drawCurveSegment:function(x,y,A){var B=this.canvasElCtx();B.moveTo(x,y);
 B.arc(x,y,A,0,2*Math.PI,false);this._isEmpty=false;},clear:function(){var A=this.canvasElCtx();var B=this.canvasEl().dom;A.fillStyle=this.backgroundColor;A.clearRect(0,0,B.width,B.height);A.fillRect(0,0,B.width,B.height);this._data=[];this.reset();this._isEmpty=true;
 },canvasEl:function(){return this.el.select('canvas',true).first();},canvasElCtx:function(){return this.el.select('canvas',true).first().dom.getContext('2d');},getImage:function(A){if(this._isEmpty){return false;}return this.canvasEl().dom.toDataURL('image/'+A,false);
 x+=F*B.endPoint.x;var y=G*B.startPoint.y;y+=3*uu*t*B.control1.y;y+=3*u*tt*B.control2.y;y+=F*B.endPoint.y;var H=B.startWidth+F*D;this.drawCurveSegment(x,y,H);}C.closePath();C.fill();},drawCurveSegment:function(x,y,A){var B=this.canvasElCtx();B.moveTo(x,y);
 B.arc(x,y,A,0,2*Math.PI,false);this._isEmpty=false;},clear:function(){var A=this.canvasElCtx();var B=this.canvasEl().dom;A.fillStyle=this.backgroundColor;A.clearRect(0,0,B.width,B.height);A.fillRect(0,0,B.width,B.height);this._data=[];this.reset();this._isEmpty=true;
 },canvasEl:function(){return this.el.select('canvas',true).first();},canvasElCtx:function(){return this.el.select('canvas',true).first().dom.getContext('2d');},getImage:function(A){if(this._isEmpty){return false;}return this.canvasEl().dom.toDataURL('image/'+A,false);
-},drawFromImage:function(A){var B=new Image();B.src=A;Roo.log(B);this.canvasElCtx().drawImage(B,0,0);},Point:(function(){function Point(x,y,A){this.x=x;this.y=y;this.time=A||Date.now();}Point.prototype.distanceTo=function(A){return Math.sqrt(Math.pow(this.x-A.x,2)+Math.pow(this.y-A.y,2));
+},drawFromImage:function(A){var B=new Image();B.src=A;this.canvasElCtx().drawImage(B,0,0);},Point:(function(){function Point(x,y,A){this.x=x;this.y=y;this.time=A||Date.now();}Point.prototype.distanceTo=function(A){return Math.sqrt(Math.pow(this.x-A.x,2)+Math.pow(this.y-A.y,2));
 };Point.prototype.equals=function(A){return this.x===A.x&&this.y===A.y&&this.time===A.time;};Point.prototype.velocityFrom=function(A){return this.time!==A.time?this.distanceTo(A)/(this.time-A.time):0;};return Point;}()),Bezier:(function(){function Bezier(A,B,C,D,E,F){this.startPoint=A;
 this.control2=B;this.control1=C;this.endPoint=D;this.startWidth=E;this.endWidth=F;}Bezier.fromPoints=function(A,B,C){var c2=this.calculateControlPoints(A[0],A[1],A[2],C).c2;var c3=this.calculateControlPoints(A[1],A[2],A[3],C).c1;return new Bezier(A[1],c2,c3,A[2],B.start,B.end);
 };Bezier.calculateControlPoints=function(s1,s2,s3,A){var B=s1.x-s2.x;var C=s1.y-s2.y;var D=s2.x-s3.x;var E=s2.y-s3.y;var m1={x:(s1.x+s2.x)/2.0,y:(s1.y+s2.y)/2.0};var m2={x:(s2.x+s3.x)/2.0,y:(s2.y+s3.y)/2.0};var l1=Math.sqrt(B*B+C*C);var l2=Math.sqrt(D*D+E*E);
 };Point.prototype.equals=function(A){return this.x===A.x&&this.y===A.y&&this.time===A.time;};Point.prototype.velocityFrom=function(A){return this.time!==A.time?this.distanceTo(A)/(this.time-A.time):0;};return Point;}()),Bezier:(function(){function Bezier(A,B,C,D,E,F){this.startPoint=A;
 this.control2=B;this.control1=C;this.endPoint=D;this.startWidth=E;this.endWidth=F;}Bezier.fromPoints=function(A,B,C){var c2=this.calculateControlPoints(A[0],A[1],A[2],C).c2;var c3=this.calculateControlPoints(A[1],A[2],A[3],C).c1;return new Bezier(A[1],c2,c3,A[2],B.start,B.end);
 };Bezier.calculateControlPoints=function(s1,s2,s3,A){var B=s1.x-s2.x;var C=s1.y-s2.y;var D=s2.x-s3.x;var E=s2.y-s3.y;var m1={x:(s1.x+s2.x)/2.0,y:(s1.y+s2.y)/2.0};var m2={x:(s2.x+s3.x)/2.0,y:(s2.y+s3.y)/2.0};var l1=Math.sqrt(B*B+C*C);var l2=Math.sqrt(D*D+E*E);