<NME> we-cropper.min.js
<BEF> ADDFILE
<MSG> dist: Added miss commit

<DFF> @@ -0,0 +1,6 @@
+/**
+ * we-cropper v1.1.5
+ * (c) 2017 dlhandsome
+ * @license MIT
+ */
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.WeCropper=e()}(this,function(){"use strict";function t(t){for(var e=[],o=arguments.length-1;o-- >0;)e[o]=arguments[o+1];n.forEach(function(o,n){void 0!==e[n]&&(t[o]=e[n])})}function e(t){return"function"==typeof t}var o=void 0,n=["touchstarted","touchmoved","touchended"],i={},c={id:{default:"cropper",get:function(){return i.id},set:function(t){"string"!=typeof t&&console.error("id\uff1a"+t+" is invalid"),i.id=t}},width:{default:750,get:function(){return i.width},set:function(t){"number"!=typeof t&&console.error("width\uff1a"+t+" is invalid"),i.width=t}},height:{default:750,get:function(){return i.height},set:function(t){"number"!=typeof t&&console.error("height\uff1a"+t+" is invalid"),i.height=t}},scale:{default:2.5,get:function(){return i.scale},set:function(t){"number"!=typeof t&&console.error("scale\uff1a"+t+" is invalid"),i.scale=t}},zoom:{default:5,get:function(){return i.zoom},set:function(t){"number"!=typeof t?console.error("zoom\uff1a"+t+" is invalid"):(t<0||t>10)&&console.error("zoom should be ranged in 0 ~ 10"),i.zoom=t}},src:{default:"cropper",get:function(){return i.src},set:function(t){"string"!=typeof t&&console.error("id\uff1a"+t+" is invalid"),i.src=t}},cut:{default:{},get:function(){return i.cut},set:function(t){"object"!=typeof t&&console.error("id\uff1a"+t+" is invalid"),i.cut=t}},onReady:{default:null,get:function(){return i.ready},set:function(t){i.ready=t}},onBeforeImageLoad:{default:null,get:function(){return i.beforeImageLoad},set:function(t){i.beforeImageLoad=t}},onImageLoad:{default:null,get:function(){return i.imageLoad},set:function(t){i.imageLoad=t}},onBeforeDraw:{default:null,get:function(){return i.beforeDraw},set:function(t){i.beforeDraw=t}}},r={touchStart:function(e){var o=e.touches,n=o[0],i=o[1];t(this,!0,null,null),this.__oneTouchStart(n),e.touches.length>=2&&this.__twoTouchStart(n,i)},touchMove:function(e){var o=e.touches,n=o[0],i=o[1];t(this,null,!0),1===e.touches.length&&this.__oneTouchMove(n),e.touches.length>=2&&this.__twoTouchMove(n,i)},touchEnd:function(e){t(this,!1,!1,!0),this.__xtouchEnd()}},a=function(t){var e={};return function(t,e){Object.defineProperties(t,e)}(this,c),Object.keys(c).forEach(function(t){e[t]=c[t].default}),Object.assign(this,e,t),this.prepare(),this.attachPage(),this.createCtx(),this.observer(),this.cutt(),this.methods(),this.init(),this.update(),this};return a.prototype.init=function(){var e=this.src;return this.version="1.1.5","function"==typeof this.onReady&&this.onReady(this.ctx,this),e&&this.pushOrign(e),t(this,!1,!1,!1),this.oldScale=1,this.newScale=1,this},Object.assign(a.prototype,r),a.prototype.prepare=function(){var t=this,e=(o||(o=wx.getSystemInfoSync()),o).windowWidth;t.attachPage=function(){var e=getCurrentPages();e[e.length-1].wecropper=t},t.createCtx=function(){var e=t.id;e?t.ctx=wx.createCanvasContext(e):console.error("constructor: create canvas context failed, 'id' must be valuable")},t.deviceRadio=e/750},a.prototype.observer=function(){var t=this,e=["ready","beforeImageLoad","beforeDraw","imageLoad"];t.on=function(o,n){return e.indexOf(o)>-1?"function"==typeof n&&("ready"===o?n(t):t["on"+function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(o)]=n):console.error("event: "+o+" is invalid"),t}},a.prototype.methods=function(){var t=this,o=t.deviceRadio,n=t.width,i=t.height,c=t.cut,r=c.x;void 0===r&&(r=0);var a=c.y;void 0===a&&(a=0);var s=c.width;void 0===s&&(s=n);var u=c.height;void 0===u&&(u=i),t.updateCanvas=function(){return t.croperTarget&&t.ctx.drawImage(t.croperTarget,t.imgLeft,t.imgTop,t.scaleWidth,t.scaleHeight),e(t.onBeforeDraw)&&t.onBeforeDraw(t.ctx,t),t.setBoundStyle(),t.ctx.draw(),t},t.pushOrign=function(o){return t.src=o,e(t.onBeforeImageLoad)&&t.onBeforeImageLoad(t.ctx,t),wx.getImageInfo({src:o,success:function(o){var n=o.width/o.height;t.croperTarget=o.path,console.log(r,a),n<s/u?(t.rectX=r,t.baseWidth=s,t.baseHeight=s/n,t.rectY=a-Math.abs((u-t.baseHeight)/2)):(t.rectY=a,t.baseWidth=u*n,t.baseHeight=u,t.rectX=r-Math.abs((s-t.baseWidth)/2)),t.imgLeft=t.rectX,t.imgTop=t.rectY,t.scaleWidth=t.baseWidth,t.scaleHeight=t.baseHeight,t.updateCanvas(),e(t.onImageLoad)&&t.onImageLoad(t.ctx,t)}}),t.update(),t},t.getCropperImage=function(){for(var n=[],i=arguments.length;i--;)n[i]=arguments[i];var c=t.id,h=toString.call(n[0]),d=n[n.length-1];switch(h){case"[object Object]":var l=n[0].quality;void 0===l&&(l=10),"number"!=typeof l?console.error("quality\uff1a"+l+" is invalid"):(l<0||l>10)&&console.error("quality should be ranged in 0 ~ 10"),wx.canvasToTempFilePath({canvasId:c,x:r,y:a,width:s,height:u,destWidth:s*l/(10*o),destHeight:u*l/(10*o),success:function(o){e(d)&&d.call(t,o.tempFilePath)},fail:function(o){e(d)&&d.call(t,null)}});break;case"[object Function]":wx.canvasToTempFilePath({canvasId:c,x:r,y:a,width:s,height:u,destWidth:s/o,destHeight:u/o,success:function(o){e(d)&&d.call(t,o.tempFilePath)},fail:function(o){e(d)&&d.call(t,null)}})}return t}},a.prototype.cutt=function(){var t=this,e=t.width,o=t.height,n=t.cut,i=n.x;void 0===i&&(i=0);var c=n.y;void 0===c&&(c=0);var r=n.width;void 0===r&&(r=e);var a=n.height;void 0===a&&(a=o),t.outsideBound=function(e,o){t.imgLeft=e>=i?i:t.scaleWidth+e-i<=r?i+r-t.scaleWidth:e,t.imgTop=o>=c?c:t.scaleHeight+o-c<=a?c+a-t.scaleHeight:o},t.setBoundStyle=function(n){void 0===n&&(n={});var s=n.color;void 0===s&&(s="#04b00f");var u=n.mask;void 0===u&&(u="rgba(0, 0, 0, 0.3)");var h=n.lineWidth;void 0===h&&(h=1),t.ctx.beginPath(),t.ctx.setFillStyle(u),t.ctx.fillRect(0,0,i,o),t.ctx.fillRect(i,0,r,c),t.ctx.fillRect(i,c+a,r,o-c-a),t.ctx.fillRect(i+r,0,e-i-r,o),t.ctx.fill(),t.ctx.beginPath(),t.ctx.setStrokeStyle(s),t.ctx.setLineWidth(h),t.ctx.moveTo(i-h,c+10-h),t.ctx.lineTo(i-h,c-h),t.ctx.lineTo(i+10-h,c-h),t.ctx.stroke(),t.ctx.beginPath(),t.ctx.setStrokeStyle(s),t.ctx.setLineWidth(h),t.ctx.moveTo(i-h,c+a-10+h),t.ctx.lineTo(i-h,c+a+h),t.ctx.lineTo(i+10-h,c+a+h),t.ctx.stroke(),t.ctx.beginPath(),t.ctx.setStrokeStyle(s),t.ctx.setLineWidth(h),t.ctx.moveTo(i+r-10+h,c-h),t.ctx.lineTo(i+r+h,c-h),t.ctx.lineTo(i+r+h,c+10-h),t.ctx.stroke(),t.ctx.beginPath(),t.ctx.setStrokeStyle(s),t.ctx.setLineWidth(h),t.ctx.moveTo(i+r+h,c+a-10+h),t.ctx.lineTo(i+r+h,c+a+h),t.ctx.lineTo(i+r-10+h,c+a+h),t.ctx.stroke()}},a.prototype.update=function(){var t=this;t.src&&(t.__oneTouchStart=function(e){t.touchX0=e.x,t.touchY0=e.y},t.__oneTouchMove=function(e){var o,n;if(t.touchended)return t.updateCanvas();o=e.x-t.touchX0,n=e.y-t.touchY0;var i=t.rectX+o,c=t.rectY+n;t.outsideBound(i,c),t.updateCanvas()},t.__twoTouchStart=function(e,o){var n,i,c;t.touchX1=t.rectX+t.scaleWidth/2,t.touchY1=t.rectY+t.scaleHeight/2,n=o.x-e.x,i=o.y-e.y,c=Math.sqrt(n*n+i*i),t.oldDistance=c},t.__twoTouchMove=function(e,o){var n,i,c,r=t.scale,a=t.zoom;n=o.x-e.x,i=o.y-e.y,c=Math.sqrt(n*n+i*i),t.newScale=t.oldScale+.001*a*(c-t.oldDistance),t.newScale<=1&&(t.newScale=1),t.newScale>=r&&(t.newScale=r),t.scaleWidth=t.newScale*t.baseWidth,t.scaleHeight=t.newScale*t.baseHeight;var s=t.touchX1-t.scaleWidth/2,u=t.touchY1-t.scaleHeight/2;t.outsideBound(s,u),t.updateCanvas()},t.__xtouchEnd=function(){t.oldScale=t.newScale,t.rectX=t.imgLeft,t.rectY=t.imgTop})},a});
\ No newline at end of file

dist: Added miss commit