diff --git a/examples/srcissors.js b/examples/srcissors.js index eb6bdad..2fc156c 100644 --- a/examples/srcissors.js +++ b/examples/srcissors.js @@ -1,2 +1,2 @@ -!function(i,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?exports.srcissors=t(require("jquery")):i.srcissors=t(i.jQuery)}(window,(function(i){return function(i){var t={};function e(s){if(t[s])return t[s].exports;var n=t[s]={i:s,l:!1,exports:{}};return i[s].call(n.exports,n,n.exports,e),n.l=!0,n.exports}return e.m=i,e.c=t,e.d=function(i,t,s){e.o(i,t)||Object.defineProperty(i,t,{enumerable:!0,get:s})},e.r=function(i){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},e.t=function(i,t){if(1&t&&(i=e(i)),8&t)return i;if(4&t&&"object"==typeof i&&i&&i.__esModule)return i;var s=Object.create(null);if(e.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:i}),2&t&&"string"!=typeof i)for(var n in i)e.d(s,n,function(t){return i[t]}.bind(null,n));return s},e.n=function(i){var t=i&&i.__esModule?function(){return i.default}:function(){return i};return e.d(t,"a",t),t},e.o=function(i,t){return Object.prototype.hasOwnProperty.call(i,t)},e.p="",e(e.s=1)}([function(t,e){t.exports=i},function(i,t,e){var s=e(0),n=e(2);i.exports={new:function(i){var t=i.arena,e=i.url,h=i.fixedWidth,o=i.fixedHeight,a=i.minWidth,r=i.minHeight,u=i.minRatio,c=i.maxRatio,l=i.maxArea,g=i.zoomStep,d=i.crop,v=i.actions,m=i.minResolution,w=i.surroundingImageOpacity,p=i.showSurroundingImage,f=(t=s(t)).find(".crop-view"),y=f.find(".crop-preview"),x=s("");y.append(x);var k=f.find(".crop-outline");k.length||(k=void 0);var R={pan:!0,zoomOnDoubleClick:!0,resize:!0,resizeHorizontal:!h,resizeVertical:!o};return s.extend(R,v),null==g&&(g=1.25),null==a&&(a=50),null==r&&(r=50),new n({url:e,crop:d,arena:t,view:f,img:x,outline:k,showSurroundingImage:p,surroundingImageOpacity:w,fixedWidth:h,fixedHeight:o,minViewWidth:a,minViewHeight:r,minViewRatio:u,maxViewRatio:c,maxArea:l,zoomStep:g,actions:R,minResolution:m})}}},function(i,t,e){function s(i,t){var e;if("undefined"==typeof Symbol||null==i[Symbol.iterator]){if(Array.isArray(i)||(e=function(i,t){if(!i)return;if("string"==typeof i)return n(i,t);var e=Object.prototype.toString.call(i).slice(8,-1);"Object"===e&&i.constructor&&(e=i.constructor.name);if("Map"===e||"Set"===e)return Array.from(i);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return n(i,t)}(i))||t&&i&&"number"==typeof i.length){e&&(i=e);var s=0,h=function(){};return{s:h,n:function(){return s>=i.length?{done:!0}:{done:!1,value:i[s++]}},e:function(i){throw i},f:h}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,r=!1;return{s:function(){e=i[Symbol.iterator]()},n:function(){var i=e.next();return a=i.done,i},e:function(i){r=!0,o=i},f:function(){try{a||null==e.return||e.return()}finally{if(r)throw o}}}}function n(i,t){(null==t||t>i.length)&&(t=i.length);for(var e=0,s=new Array(t);en&&delete this.minResolution,this.minResolution){var h=this.minResolution/(this.imageHeight*this.imageHeight);(!this.minViewRatio||this.minViewRatioo)&&(this.maxViewRatio=o)}this.calcMaxMinDimensions(),this.fixedWidth&&(t="width"),this.fixedHeight&&(t="height"),this.setViewDimensions({width:this.imageWidth,height:this.imageHeight,keepDimension:t}),this.isReady=!0,this.view.removeClass(this.loadingCssClass),this.isInitialized||null==this.initialCrop?(this.zoomAllOut(),this.center()):this.setCrop(this.initialCrop),this.isInitialized=!0,this.readyEvent.fire(),this.loadEvent.fire()}},{key:"setCrop",value:function(i){var t=this,e=i.x,s=i.y,n=i.width,h=i.height;if(this.isReady){this.resize({width:n,height:h});var o=this.viewWidth/n,a=this.imageWidth*o;this.zoom({width:a}),this.pan({x:e*o,y:s*o})}else this.on("ready",(function(){return t.setCrop({x:e,y:s,width:n,height:h})}))}},{key:"getCrop",value:function(){var i=this.preview.width/this.imageWidth,t={x:this.preview.x/i,y:this.preview.y/i,width:this.viewWidth/i,height:this.viewHeight/i};return this.roundCrop(t),this.validateCrop(t),t}},{key:"roundCrop",value:function(i){for(var t in i){var e=i[t];i[t]=Math.round(e)}}},{key:"validateCrop",value:function(i){var t=i.x,e=i.y,s=i.width,n=i.height;return t+s>this.imageWidth?i.width=this.imageWidth-t:e+n>this.imageHeight&&(i.height=this.imageHeight-e),i}},{key:"setRatio",value:function(i,t){var e,s,n=this;if(this.isReady)return i=this.enforceValidRatio(i),"height"===t?s=(e=this.viewHeight)*i:e=(s=this.viewWidth)/i,this.resizeFocusPoint=this.getFocusPoint(),this.resize({width:s,height:e});this.on("ready",(function(){return n.setRatio(i,t)}))}},{key:"onPan",value:function(i){this.isPanning||(this.isPanning=!0,this.arena.addClass(this.panningCssClass),this.outline.addClass(this.outlineCssClass));var t=i.startX-i.dx,e=i.startY-i.dy;this.pan({x:t,y:e})}},{key:"onPanEnd",value:function(){return this.isPanning=!1,this.arena.removeClass(this.panningCssClass),this.outline.removeClass(this.outlineCssClass)}},{key:"onDoubleClick",value:function(i){var t=i.pageX,e=i.pageY,s=this.view[0].getBoundingClientRect(),n=t-s.left,h=e-s.top;this.zoomIn({viewX:n,viewY:h})}},{key:"onResize",value:function(i){var t=i.position,e=i.dx,s=i.dy;this.isResizing||(this.isResizing=!0,this.resizeFocusPoint=this.getFocusPoint()),["top","bottom"].includes(t)?(s*=2,this.resize({width:this.viewWidth,height:this.viewHeight+s,keepDimension:"height"})):["left","right"].includes(t)&&(e*=2,this.resize({width:this.viewWidth+e,height:this.viewHeight,keepDimension:"width"}))}},{key:"onResizeEnd",value:function(){this.isResizing=!1,this.resizeFocusPoint=void 0}},{key:"resize",value:function(i){var t=i.width,e=i.height,s=i.keepDimension;this.setViewDimensions({width:t,height:e,keepDimension:s}),this.resizeFocusPoint&&(this.resizeFocusPoint.viewX=this.viewWidth/2,this.resizeFocusPoint.viewY=this.viewHeight/2),this.zoom({width:this.preview.width,height:this.preview.height,focusPoint:this.resizeFocusPoint})}},{key:"setViewDimensions",value:function(i){var t=i.width,e=i.height,s=i.keepDimension;if(this.maxArea){var n=this.enforceMaxArea({width:t,height:e,keepDimension:s});t=n.width,e=n.height}var h=this.enforceViewDimensions({width:t,height:e,keepDimension:s});if(t=h.width,e=h.height,this.view.css({width:t,height:e}),this.viewWidth=t,this.viewHeight=e,this.viewRatio=t/e,this.minResolution){var o=Math.sqrt(this.minResolution*this.viewRatio),a=Math.sqrt(this.minResolution/this.viewRatio);this.maxImageWidth=this.viewWidth/o*this.imageWidth,this.maxImageHeight=this.viewHeight/a*this.imageHeight}this.fireChange()}},{key:"zoomAllOut",value:function(){this.isWidthRestricting()?this.zoom({width:this.viewWidth}):this.zoom({height:this.viewHeight})}},{key:"zoomIn",value:function(i){null==i&&(i={}),this.isWidthRestricting()?i.width=this.preview.width*this.zoomInStep:i.height=this.preview.height*this.zoomInStep,this.zoom(i)}},{key:"zoomOut",value:function(i){null==i&&(i={}),this.isWidthRestricting()?i.width=this.preview.width*this.zoomOutStep:i.height=this.preview.height*this.zoomOutStep,this.zoom(i)}},{key:"zoom",value:function(i){var t=i.width,e=i.height,s=i.viewX,n=i.viewY,h=i.focusPoint;null==h&&(h=this.getFocusPoint({viewX:s,viewY:n}));var o=this.enforceZoom({width:t,height:e});t=o.width,e=o.height,null!=t?(this.preview.setWidth(t),this.fireChange()):null!=e&&(this.preview.setHeight(e),this.fireChange()),this.focus(h)}},{key:"getFocusPoint",value:function(i){null==i&&(i={});var t=i,e=t.viewX,s=t.viewY;null==e&&(e=this.viewWidth/2),null==s&&(s=this.viewHeight/2);var n=this.preview.x+e,h=this.preview.y+s;return{percentX:n/this.preview.width,percentY:h/this.preview.height,viewX:e,viewY:s}}},{key:"focus",value:function(i){var t=i.percentX,e=i.percentY,s=i.viewX,n=i.viewY,h=this.preview.width*t,o=this.preview.height*e;h-=s,o-=n,this.pan({x:h,y:o})}},{key:"center",value:function(){var i=(this.preview.width-this.viewWidth)/2,t=(this.preview.height-this.viewHeight)/2;this.pan({x:i,y:t})}},{key:"pan",value:function(i){i=this.enforceXy(i),this.preview.pan(i.x,i.y),this.fireChange()}},{key:"enforceXy",value:function(i){var t=i.x,e=i.y;return t<0?t=0:t>this.preview.width-this.viewWidth&&(t=this.preview.width-this.viewWidth),e<0?e=0:e>this.preview.height-this.viewHeight&&(e=this.preview.height-this.viewHeight),{x:t,y:e}}},{key:"enforceZoom",value:function(i){var t=i.width,e=i.height;return null!=t&&this.maxImageWidth&&t>this.maxImageWidth?{width:this.maxImageWidth}:null!=t&&tthis.maxImageHeight?{height:this.maxImageHeight}:null!=e&&ethis.maxWidth||ethis.maxHeight||sthis.maxViewRatio)}},{key:"isValidRatio",value:function(i){return!(ithis.maxViewRatio)}},{key:"enforceValidRatio",value:function(i){return ithis.maxViewRatio?this.maxViewRatio:i}},{key:"enforceViewDimensions",value:function(i){var t,e,s,n=i.width,h=i.height,o=i.keepDimension;if(nthis.maxWidth&&(e=this.maxWidth),hthis.maxHeight&&(t=this.maxHeight),o){if(e&&(n=e),t&&(h=t),s=n/h,!this.isValidRatio(s)){s=this.enforceValidRatio(s);var a=this.getRatioBox({ratio:s,width:n,height:h,keepDimension:o});if(n=a.width,h=a.height,n>this.arenaWidth||h>this.arenaHeight){var r=this.centerAlign(this.maxWidth,this.maxHeight,s);n=r.width,h=r.height}}}else if(e||t){s=this.enforceValidRatio(n/h);var u=this.centerAlign(this.maxWidth,this.maxHeight,s);n=u.width,h=u.height}return{width:n,height:h}}},{key:"enforceMaxArea",value:function(i){var t=i.width,e=i.height,s=i.keepDimension,n=t/e;return"width"===s?n=t/(e=this.maxArea/t):"height"===s?n=(t=this.maxArea/e)/e:e=(t=Math.sqrt(this.maxArea*n))/n,this.isValidRatio(n)||(n=this.enforceValidRatio(n),e=(t=Math.sqrt(this.maxArea*n))/n),{width:t,height:e}}},{key:"isWidthRestricting",value:function(){return this.viewRatio>=this.imageRatio}},{key:"getRatioBox",value:function(i){var t=i.ratio,e=i.width,s=i.height,n=i.keepDimension;return"width"===n||null==s?s=e/t:"height"===n||null==e?e=s*t:s=e/t,{width:e,height:s}}},{key:"centerAlign",value:function(i,t,e){var s,n,h,o;return i/t>e?h=(i-(n=t*e))/2:o=(t-(s=i/e))/2,{x:h||0,y:o||0,width:n||i,height:s||t}}},{key:"min",value:function(i){var t,e=i[0],n=s(i);try{for(n.s();!(t=n.n()).done;){var h=t.value;h0){var e=n("").css({opacity:this.opacity}).attr("src",t);this.outline.append(e)}}},{key:"reset",value:function(){this.url=void 0,this.x=this.y=0,this.width=this.height=0,this.img.attr("src",""),this.img.css({width:"",height:"",transform:""}),this.outline&&this.outline.css({transform:""}).html("")}},{key:"setWidth",value:function(i){this.img.css({width:"".concat(i,"px"),height:"auto"});var t=i/this.ratio;this.updateImageDimensions({width:i,height:t})}},{key:"setHeight",value:function(i){this.img.css({width:"auto",height:"".concat(i,"px")});var t=i*this.ratio;this.updateImageDimensions({width:t,height:i})}},{key:"updateImageDimensions",value:function(i){var t=i.width,e=i.height;this.width=t,this.height=e,this.outline&&this.outline.css({width:"".concat(this.width,"px"),height:"".concat(this.height,"px")})}},{key:"pan",value:function(i,t){this.x=i,this.y=t;var e=Math.round(this.x),s=Math.round(this.y);this.img.css({transform:"translate(-".concat(e,"px, -").concat(s,"px)")}),this.outline&&this.outline.css({transform:"translate(-".concat(e,"px, -").concat(s,"px)")})}}])&&s(t.prototype,e),h&&s(t,h),i}()},function(i,t,e){function s(i,t){for(var e=0;es-t.doubleClickThreshold&&t.parent.onDoubleClick(h(e)),i=s}))}},{key:"preventBrowserDragDrop",value:function(){this.view.on("dragstart.srcissors",(function(){return!1}))}},{key:"resizeView",value:function(i){var t=this,e=i.horizontal,s=i.vertical,h=n("
");h.addClass("resize-handler");var o=[];e&&(o=o.concat(["right","left"])),s&&(o=o.concat(["top","bottom"])),o.forEach((function(i){var e=h.clone();e.addClass("resize-handler-".concat(i)),e.on("mousedown.srcissors touchstart.srcissors",t.getResizeMouseDown(i)),t.view.append(e)}))}},{key:"getResizeMouseDown",value:function(i){var t=this,e=n(document);return function(s){var n=h(s),o=n.pageX,a=n.pageY;s.stopPropagation(),e.on("mousemove.srcissors-resize touchmove.srcissors-resize",(function(e){var s,n,r=h(e),u=r.pageX,c=r.pageY;switch(i){case"top":case"bottom":n=c-a,"top"===i&&(n=-n),a=c;break;case"left":case"right":s=u-o,"left"===i&&(s=-s),o=u}t.parent.onResize({position:i,dx:s,dy:n})})).on("mouseup.srcissors-resize touchend.srcissors-resize",(function(){e.off("mouseup.srcissors-resize touchmove.srcissors-resize"),e.off("mousemove.srcissors-resize touchend.srcissors-resize"),t.parent.onResizeEnd({position:i})}))}}},{key:"responsiveArena",value:function(){}}])&&s(t.prototype,e),o&&s(t,o),i}()}])})); +!function(i,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?exports.srcissors=t(require("jquery")):i.srcissors=t(i.jQuery)}(window,(function(i){return function(i){var t={};function e(s){if(t[s])return t[s].exports;var n=t[s]={i:s,l:!1,exports:{}};return i[s].call(n.exports,n,n.exports,e),n.l=!0,n.exports}return e.m=i,e.c=t,e.d=function(i,t,s){e.o(i,t)||Object.defineProperty(i,t,{enumerable:!0,get:s})},e.r=function(i){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},e.t=function(i,t){if(1&t&&(i=e(i)),8&t)return i;if(4&t&&"object"==typeof i&&i&&i.__esModule)return i;var s=Object.create(null);if(e.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:i}),2&t&&"string"!=typeof i)for(var n in i)e.d(s,n,function(t){return i[t]}.bind(null,n));return s},e.n=function(i){var t=i&&i.__esModule?function(){return i.default}:function(){return i};return e.d(t,"a",t),t},e.o=function(i,t){return Object.prototype.hasOwnProperty.call(i,t)},e.p="",e(e.s=1)}([function(t,e){t.exports=i},function(i,t,e){var s=e(0),n=e(2);i.exports={new:function(i){var t=i.arena,e=i.url,h=i.fixedWidth,o=i.fixedHeight,a=i.minWidth,r=i.minHeight,u=i.minRatio,c=i.maxRatio,l=i.maxArea,d=i.zoomStep,g=i.crop,v=i.actions,m=i.minResolution,w=i.surroundingImageOpacity,p=i.showSurroundingImage,f=(t=s(t)).find(".crop-view"),y=f.find(".crop-preview"),x=s("");y.append(x);var k=f.find(".crop-outline");k.length||(k=void 0);var R={pan:!0,zoomOnDoubleClick:!0,resize:!0,resizeHorizontal:!h,resizeVertical:!o};return s.extend(R,v),null==d&&(d=1.25),null==a&&(a=50),null==r&&(r=50),new n({url:e,crop:g,arena:t,view:f,img:x,outline:k,showSurroundingImage:p,surroundingImageOpacity:w,fixedWidth:h,fixedHeight:o,minViewWidth:a,minViewHeight:r,minViewRatio:u,maxViewRatio:c,maxArea:l,zoomStep:d,actions:R,minResolution:m})}}},function(i,t,e){function s(i,t){var e;if("undefined"==typeof Symbol||null==i[Symbol.iterator]){if(Array.isArray(i)||(e=function(i,t){if(!i)return;if("string"==typeof i)return n(i,t);var e=Object.prototype.toString.call(i).slice(8,-1);"Object"===e&&i.constructor&&(e=i.constructor.name);if("Map"===e||"Set"===e)return Array.from(i);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return n(i,t)}(i))||t&&i&&"number"==typeof i.length){e&&(i=e);var s=0,h=function(){};return{s:h,n:function(){return s>=i.length?{done:!0}:{done:!1,value:i[s++]}},e:function(i){throw i},f:h}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,r=!1;return{s:function(){e=i[Symbol.iterator]()},n:function(){var i=e.next();return a=i.done,i},e:function(i){r=!0,o=i},f:function(){try{a||null==e.return||e.return()}finally{if(r)throw o}}}}function n(i,t){(null==t||t>i.length)&&(t=i.length);for(var e=0,s=new Array(t);en&&delete this.minResolution,this.minResolution){var h=this.minResolution/(this.imageHeight*this.imageHeight);(!this.minViewRatio||this.minViewRatioo)&&(this.maxViewRatio=o)}this.calcMaxMinDimensions(),this.fixedWidth&&(t="width"),this.fixedHeight&&(t="height"),this.setViewDimensions({width:this.imageWidth,height:this.imageHeight,keepDimension:t}),this.isReady=!0,this.view.removeClass(this.loadingCssClass),this.isInitialized||null==this.initialCrop?(this.zoomAllOut(),this.center()):this.setCrop(this.initialCrop),this.isInitialized=!0,this.readyEvent.fire(),this.loadEvent.fire()}},{key:"setCrop",value:function(i){var t=this,e=i.x,s=i.y,n=i.width,h=i.height;if(this.isReady){this.resize({width:n,height:h});var o=this.viewWidth/n,a=this.imageWidth*o;this.zoom({width:a}),this.pan({x:e*o,y:s*o})}else this.on("ready",(function(){return t.setCrop({x:e,y:s,width:n,height:h})}))}},{key:"getCrop",value:function(){var i=this.preview.width/this.imageWidth,t={x:this.preview.x/i,y:this.preview.y/i,width:this.viewWidth/i,height:this.viewHeight/i};return this.roundCrop(t),this.validateCrop(t),t}},{key:"roundCrop",value:function(i){for(var t in i){var e=i[t];i[t]=Math.round(e)}}},{key:"validateCrop",value:function(i){var t=i.x,e=i.y,s=i.width,n=i.height;return t+s>this.imageWidth?i.width=this.imageWidth-t:e+n>this.imageHeight&&(i.height=this.imageHeight-e),i}},{key:"setRatio",value:function(i,t){var e,s,n=this;if(this.isReady)return i=this.enforceValidRatio(i),"height"===t?s=(e=this.viewHeight)*i:e=(s=this.viewWidth)/i,this.resizeFocusPoint=this.getFocusPoint(),this.resize({width:s,height:e});this.on("ready",(function(){return n.setRatio(i,t)}))}},{key:"onPan",value:function(i){this.isPanning||(this.isPanning=!0,this.arena.addClass(this.panningCssClass),this.outline.addClass(this.outlineCssClass));var t=i.startX-i.dx,e=i.startY-i.dy;this.pan({x:t,y:e})}},{key:"onPanEnd",value:function(){return this.isPanning=!1,this.arena.removeClass(this.panningCssClass),this.outline.removeClass(this.outlineCssClass)}},{key:"onDoubleClick",value:function(i){var t=i.pageX,e=i.pageY,s=this.view[0].getBoundingClientRect(),n=t-s.left,h=e-s.top;this.zoomIn({viewX:n,viewY:h})}},{key:"onResize",value:function(i){var t=i.position,e=i.dx,s=i.dy;this.isResizing||(this.isResizing=!0,this.resizeFocusPoint=this.getFocusPoint()),["top","bottom"].includes(t)?(s*=2,this.resize({width:this.viewWidth,height:this.viewHeight+s,keepDimension:"height"})):["left","right"].includes(t)&&(e*=2,this.resize({width:this.viewWidth+e,height:this.viewHeight,keepDimension:"width"}))}},{key:"onResizeEnd",value:function(){this.isResizing=!1,this.resizeFocusPoint=void 0}},{key:"resize",value:function(i){var t=i.width,e=i.height,s=i.keepDimension;this.setViewDimensions({width:t,height:e,keepDimension:s}),this.resizeFocusPoint&&(this.resizeFocusPoint.viewX=this.viewWidth/2,this.resizeFocusPoint.viewY=this.viewHeight/2),this.zoom({width:this.preview.width,height:this.preview.height,focusPoint:this.resizeFocusPoint})}},{key:"setViewDimensions",value:function(i){var t=i.width,e=i.height,s=i.keepDimension;if(this.maxArea){var n=this.enforceMaxArea({width:t,height:e,keepDimension:s});t=n.width,e=n.height}var h=this.enforceViewDimensions({width:t,height:e,keepDimension:s});if(t=h.width,e=h.height,this.view.css({width:t,height:e}),this.viewWidth=t,this.viewHeight=e,this.viewRatio=t/e,this.minResolution){var o=Math.sqrt(this.minResolution*this.viewRatio),a=Math.sqrt(this.minResolution/this.viewRatio);this.maxImageWidth=this.viewWidth/o*this.imageWidth,this.maxImageHeight=this.viewHeight/a*this.imageHeight}this.fireChange()}},{key:"zoomAllOut",value:function(){this.isWidthRestricting()?this.zoom({width:this.viewWidth}):this.zoom({height:this.viewHeight})}},{key:"zoomIn",value:function(i){null==i&&(i={}),this.isWidthRestricting()?i.width=this.preview.width*this.zoomInStep:i.height=this.preview.height*this.zoomInStep,this.zoom(i)}},{key:"zoomOut",value:function(i){null==i&&(i={}),this.isWidthRestricting()?i.width=this.preview.width*this.zoomOutStep:i.height=this.preview.height*this.zoomOutStep,this.zoom(i)}},{key:"zoom",value:function(i){var t=i.width,e=i.height,s=i.viewX,n=i.viewY,h=i.focusPoint;null==h&&(h=this.getFocusPoint({viewX:s,viewY:n}));var o=this.enforceZoom({width:t,height:e});t=o.width,e=o.height,null!=t?(this.preview.setWidth(t),this.fireChange()):null!=e&&(this.preview.setHeight(e),this.fireChange()),this.focus(h)}},{key:"getFocusPoint",value:function(i){null==i&&(i={});var t=i,e=t.viewX,s=t.viewY;null==e&&(e=this.viewWidth/2),null==s&&(s=this.viewHeight/2);var n=this.preview.x+e,h=this.preview.y+s;return{percentX:n/this.preview.width,percentY:h/this.preview.height,viewX:e,viewY:s}}},{key:"focus",value:function(i){var t=i.percentX,e=i.percentY,s=i.viewX,n=i.viewY,h=this.preview.width*t,o=this.preview.height*e;h-=s,o-=n,this.pan({x:h,y:o})}},{key:"center",value:function(){var i=(this.preview.width-this.viewWidth)/2,t=(this.preview.height-this.viewHeight)/2;this.pan({x:i,y:t})}},{key:"pan",value:function(i){i=this.enforceXy(i),this.preview.pan(i.x,i.y),this.fireChange()}},{key:"enforceXy",value:function(i){var t=i.x,e=i.y;return t<0?t=0:t>this.preview.width-this.viewWidth&&(t=this.preview.width-this.viewWidth),e<0?e=0:e>this.preview.height-this.viewHeight&&(e=this.preview.height-this.viewHeight),{x:t,y:e}}},{key:"enforceZoom",value:function(i){var t=i.width,e=i.height;return null!=t&&this.maxImageWidth&&t>this.maxImageWidth?{width:this.maxImageWidth}:null!=t&&tthis.maxImageHeight?{height:this.maxImageHeight}:null!=e&&ethis.maxWidth||ethis.maxHeight||sthis.maxViewRatio)}},{key:"isValidRatio",value:function(i){return!(ithis.maxViewRatio)}},{key:"enforceValidRatio",value:function(i){return ithis.maxViewRatio?this.maxViewRatio:i}},{key:"enforceViewDimensions",value:function(i){var t,e,s,n=i.width,h=i.height,o=i.keepDimension;if(nthis.maxWidth&&(e=this.maxWidth),hthis.maxHeight&&(t=this.maxHeight),o){if(e&&(n=e),t&&(h=t),s=n/h,!this.isValidRatio(s)){s=this.enforceValidRatio(s);var a=this.getRatioBox({ratio:s,width:n,height:h,keepDimension:o});if(n=a.width,h=a.height,n>this.arenaWidth||h>this.arenaHeight){var r=this.centerAlign(this.maxWidth,this.maxHeight,s);n=r.width,h=r.height}}}else if(e||t){s=this.enforceValidRatio(n/h);var u=this.centerAlign(this.maxWidth,this.maxHeight,s);n=u.width,h=u.height}return{width:n,height:h}}},{key:"enforceMaxArea",value:function(i){var t=i.width,e=i.height,s=i.keepDimension,n=t/e;return"width"===s?n=t/(e=this.maxArea/t):"height"===s?n=(t=this.maxArea/e)/e:e=(t=Math.sqrt(this.maxArea*n))/n,this.isValidRatio(n)||(n=this.enforceValidRatio(n),e=(t=Math.sqrt(this.maxArea*n))/n),{width:t,height:e}}},{key:"isWidthRestricting",value:function(){return this.viewRatio>=this.imageRatio}},{key:"getRatioBox",value:function(i){var t=i.ratio,e=i.width,s=i.height,n=i.keepDimension;return"width"===n||null==s?s=e/t:"height"===n||null==e?e=s*t:s=e/t,{width:e,height:s}}},{key:"centerAlign",value:function(i,t,e){var s,n,h,o;return i/t>e?h=(i-(n=t*e))/2:o=(t-(s=i/e))/2,{x:h||0,y:o||0,width:n||i,height:s||t}}},{key:"min",value:function(i){var t,e=i[0],n=s(i);try{for(n.s();!(t=n.n()).done;){var h=t.value;h0){var e=n("").css({opacity:this.opacity}).attr("src",t);this.outline.append(e)}}},{key:"reset",value:function(){this.url=void 0,this.x=this.y=0,this.width=this.height=0,this.img.attr("src",""),this.img.css({width:"",height:"",transform:""}),this.outline&&this.outline.css({transform:""}).html("")}},{key:"setWidth",value:function(i){this.img.css({width:"".concat(i,"px"),height:"auto"});var t=i/this.ratio;this.updateImageDimensions({width:i,height:t})}},{key:"setHeight",value:function(i){this.img.css({width:"auto",height:"".concat(i,"px")});var t=i*this.ratio;this.updateImageDimensions({width:t,height:i})}},{key:"updateImageDimensions",value:function(i){var t=i.width,e=i.height;this.width=t,this.height=e,this.outline&&this.outline.css({width:"".concat(this.width,"px"),height:"".concat(this.height,"px")})}},{key:"pan",value:function(i,t){this.x=i,this.y=t;var e=Math.round(this.x),s=Math.round(this.y);this.img.css({transform:"translate(-".concat(e,"px, -").concat(s,"px)")}),this.outline&&this.outline.css({transform:"translate(-".concat(e,"px, -").concat(s,"px)")})}}])&&s(t.prototype,e),h&&s(t,h),i}()},function(i,t,e){function s(i,t){for(var e=0;es-t.doubleClickThreshold&&t.parent.onDoubleClick(h(e)),i=s}))}},{key:"preventBrowserDragDrop",value:function(){this.view.on("dragstart.srcissors",(function(){return!1}))}},{key:"resizeView",value:function(i){var t=this,e=i.horizontal,s=i.vertical,h=n("
");h.addClass("resize-handler");var o=[];e&&(o=o.concat(["right","left"])),s&&(o=o.concat(["top","bottom"])),o.forEach((function(i){var e=h.clone();e.addClass("resize-handler-".concat(i)),e.on("mousedown.srcissors touchstart.srcissors",t.getResizeMouseDown(i)),t.view.append(e)}))}},{key:"getResizeMouseDown",value:function(i){var t=this,e=n(document);return function(s){var n=h(s),o=n.pageX,a=n.pageY;s.stopPropagation(),e.on("mousemove.srcissors-resize touchmove.srcissors-resize",(function(e){var s,n,r=h(e),u=r.pageX,c=r.pageY;switch(i){case"top":case"bottom":n=c-a,"top"===i&&(n=-n),a=c;break;case"left":case"right":s=u-o,"left"===i&&(s=-s),o=u}t.parent.onResize({position:i,dx:s,dy:n})})).on("mouseup.srcissors-resize touchend.srcissors-resize",(function(){e.off("mouseup.srcissors-resize touchmove.srcissors-resize"),e.off("mousemove.srcissors-resize touchend.srcissors-resize"),t.parent.onResizeEnd({position:i})}))}}},{key:"responsiveArena",value:function(){}}])&&s(t.prototype,e),o&&s(t,o),i}()}])})); //# sourceMappingURL=srcissors.js.map \ No newline at end of file diff --git a/examples/srcissors.js.map b/examples/srcissors.js.map index 39d7e8a..3a8aa14 100644 --- a/examples/srcissors.js.map +++ b/examples/srcissors.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://srcissors/srcissors.js"],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__0__","modules","installedModules","__webpack_require__","moduleId","i","l","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","$","Crop","new","_ref","arena","url","fixedWidth","fixedHeight","minWidth","minHeight","minRatio","maxRatio","maxArea","zoomStep","crop","actions","minResolution","surroundingImageOpacity","showSurroundingImage","view","find","preview","img","append","outline","length","undefined","allowedActions","pan","zoomOnDoubleClick","resize","resizeHorizontal","resizeVertical","extend","minViewWidth","minViewHeight","minViewRatio","maxViewRatio","_createForOfIteratorHelper","allowArrayLike","it","iterator","Array","isArray","minLen","_arrayLikeToArray","toString","slice","constructor","from","test","_unsupportedIterableToArray","F","done","e","_e","f","TypeError","err","normalCompletion","didErr","step","next","_e2","return","arr","len","arr2","_defineProperties","target","props","descriptor","configurable","writable","Preview","Events","instance","Constructor","_classCallCheck","this","onPreviewReady","loadingCssClass","panningCssClass","outlineCssClass","isPanning","initialCrop","loadEvent","Callbacks","changeEvent","initializeReadyState","zoomInStep","zoomOutStep","arenaWidth","width","arenaHeight","height","setSurroundingImageVisibility","onReady","opacity","setImage","protoProps","staticProps","isReady","readyEvent","empty","isInitialized","reset","addClass","visibility","parseFloat","css","imageWidth","imageHeight","zoomAllOut","_ref2","keepDimension","events","parent","imageRatio","imageResolution","minRatioForResolution","maxRatioForResolution","calcMaxMinDimensions","setViewDimensions","removeClass","center","setCrop","fire","_ref3","_this","x","y","factor","viewWidth","previewWidth","zoom","on","viewHeight","roundCrop","validateCrop","Math","round","ratio","_this2","enforceValidRatio","resizeFocusPoint","getFocusPoint","setRatio","data","newX","startX","dx","newY","startY","dy","_ref4","pageX","pageY","_this$view$0$getBound","getBoundingClientRect","viewX","left","viewY","top","zoomIn","_ref5","position","isResizing","includes","_ref6","focusPoint","_ref7","_this$enforceMaxArea","enforceMaxArea","_this$enforceViewDime","enforceViewDimensions","viewRatio","minZoomPixelWidth","sqrt","minZoomPixelHeight","maxImageWidth","maxImageHeight","fireChange","isWidthRestricting","params","_ref8","_this$enforceZoom","enforceZoom","setWidth","setHeight","focus","param","_param","percentX","percentY","_ref9","enforceXy","_ref10","_ref11","maxWidth","min","maxHeight","_ref12","_ref13","newHeight","newWidth","isValidRatio","_this$getRatioBox","getRatioBox","_this$centerAlign","centerAlign","_this$centerAlign2","_ref14","_ref15","areaWidth","areaHeight","array","_step","_iterator","number","callback","concat","add","remove","_this3","changeDispatch","setTimeout","getCrop","num","obj","image","previewXy","console","log","updateImageDimensions","show","attr","setBackgroundImage","bgImg","transform","html","x1","y1","getPageCoordinates","event","type","originalEvent","changedTouches","horizontal","vertical","doubleClickThreshold","doubleClick","resizeView","preventBrowserDragDrop","responsiveArena","$doc","document","e1","panData","preventDefault","e2","_getPageCoordinates","_getPageCoordinates2","prevPageX","prevPageY","onPan","off","onPanEnd","lastClick","now","Date","getTime","onDoubleClick","$template","positions","forEach","$handler","clone","getResizeMouseDown","_this4","_getPageCoordinates3","lastX","lastY","stopPropagation","_getPageCoordinates4","onResize","onResizeEnd"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,WACR,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,UAAWJ,GACO,iBAAZC,QACdA,QAAmB,UAAID,EAAQG,QAAQ,WAEvCJ,EAAgB,UAAIC,EAAQD,EAAa,QAR3C,CASGO,QAAQ,SAASC,GACpB,OAAgB,SAAUC,GAEhB,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF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F,IAAK,OACL,IAAK,QACHN,EAAKK,EAAQ6H,EAEI,SAAbnH,IACFf,GAAMA,GAGRkI,EAAQ7H,EAIZ2H,EAAOlK,OAAOwK,SAAS,CACrBvH,SAAUA,EACVf,GAAIA,EACJG,GAAIA,OAELlB,GAAG,sDAAsD,WAC1DuH,EAAKW,IAAI,uDACTX,EAAKW,IAAI,wDAETa,EAAOlK,OAAOyK,YAAY,CACxBxH,SAAUA,UAKjB,CACD/K,IAAK,kBACLN,MAAO,iBAnMmEmF,EAAkBS,EAAYjF,UAAWwG,GAAiBC,GAAajC,EAAkBS,EAAawB,GAsM3K1B,EApLqB","file":"./srcissors.js","sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://srcissors/srcissors.js"],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__0__","modules","installedModules","__webpack_require__","moduleId","i","l","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","$","Crop","new","_ref","arena","url","fixedWidth","fixedHeight","minWidth","minHeight","minRatio","maxRatio","maxArea","zoomStep","crop","actions","minResolution","surroundingImageOpacity","showSurroundingImage","view","find","preview","img","append","outline","length","undefined","allowedActions","pan","zoomOnDoubleClick","resize","resizeHorizontal","resizeVertical","extend","minViewWidth","minViewHeight","minViewRatio","maxViewRatio","_createForOfIteratorHelper","allowArrayLike","it","iterator","Array","isArray","minLen","_arrayLikeToArray","toString","slice","constructor","from","test","_unsupportedIterableToArray","F","done","e","_e","f","TypeError","err","normalCompletion","didErr","step","next","_e2","return","arr","len","arr2","_defineProperties","target","props","descriptor","configurable","writable","Preview","Events","instance","Constructor","_classCallCheck","this","onPreviewReady","loadingCssClass","panningCssClass","outlineCssClass","isPanning","initialCrop","loadEvent","Callbacks","changeEvent","initializeReadyState","zoomInStep","zoomOutStep","arenaWidth","width","arenaHeight","height","setSurroundingImageVisibility","onReady","opacity","setImage","protoProps","staticProps","isReady","readyEvent","empty","isInitialized","reset","addClass","visibility","parseFloat","css","imageWidth","imageHeight","zoomAllOut","_ref2","keepDimension","events","parent","imageRatio","imageResolution","minRatioForResolution","maxRatioForResolution","calcMaxMinDimensions","setViewDimensions","removeClass","center","setCrop","fire","_ref3","_this","x","y","factor","viewWidth","previewWidth","zoom","on","viewHeight","roundCrop","validateCrop","Math","round","ratio","_this2","enforceValidRatio","resizeFocusPoint","getFocusPoint","setRatio","data","newX","startX","dx","newY","startY","dy","_ref4","pageX","pageY","_this$view$0$getBound","getBoundingClientRect","viewX","left","viewY","top","zoomIn","_ref5","position","isResizing","includes","_ref6","focusPoint","_ref7","_this$enforceMaxArea","enforceMaxArea","_this$enforceViewDime","enforceViewDimensions","viewRatio","minZoomPixelWidth","sqrt","minZoomPixelHeight","maxImageWidth","maxImageHeight","fireChange","isWidthRestricting","params","_ref8","_this$enforceZoom","enforceZoom","setWidth","setHeight","focus","param","_param","percentX","percentY","_ref9","enforceXy","_ref10","_ref11","maxWidth","min","maxHeight","_ref12","_ref13","newHeight","newWidth","isValidRatio","_this$getRatioBox","getRatioBox","_this$centerAlign","centerAlign","_this$centerAlign2","_ref14","_ref15","areaWidth","areaHeight","array","_step","_iterator","number","callback","concat","add","remove","_this3","changeDispatch","setTimeout","getCrop","num","obj","image","previewXy","console","log","updateImageDimensions","show","attr","setBackgroundImage","bgImg","transform","html","x1","y1","getPageCoordinates","event","type","originalEvent","changedTouches","horizontal","vertical","doubleClickThreshold","doubleClick","resizeView","preventBrowserDragDrop","responsiveArena","$doc","document","e1","panData","preventDefault","e2","_getPageCoordinates","_getPageCoordinates2","prevPageX","prevPageY","onPan","off","onPanEnd","lastClick","now","Date","getTime","onDoubleClick","$template","positions","forEach","$handler","clone","getResizeMouseDown","_this4","_getPageCoordinates3","lastX","lastY","stopPropagation","_getPageCoordinates4","onResize","onResizeEnd"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,i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yD,SAAU4H,GACzE,IAAI7G,EAAIG,EAEJkI,EAAuBzC,EAAmBiB,GAC1CxG,EAAQgI,EAAqBhI,MAC7BC,EAAQ+H,EAAqB/H,MAEjC,OAAQS,GACN,IAAK,MACL,IAAK,SACHZ,EAAKG,EAAQ6H,EAEI,QAAbpH,IACFZ,GAAMA,GAGRgI,EAAQ7H,EACR,MAEF,IAAK,OACL,IAAK,QACHN,EAAKK,EAAQ6H,EAEI,SAAbnH,IACFf,GAAMA,GAGRkI,EAAQ7H,EAIZ2H,EAAOlK,OAAOwK,SAAS,CACrBvH,SAAUA,EACVf,GAAIA,EACJG,GAAIA,OAELlB,GAAG,sDAAsD,WAC1DuH,EAAKW,IAAI,uDACTX,EAAKW,IAAI,wDAETa,EAAOlK,OAAOyK,YAAY,CACxBxH,SAAUA,UAKjB,CACD/K,IAAK,kBACLN,MAAO,iBA/LmEmF,EAAkBS,EAAYjF,UAAWwG,GAAiBC,GAAajC,EAAkBS,EAAawB,GAkM3K1B,EAhLqB","file":"./srcissors.js","sourceRoot":""} \ No newline at end of file diff --git a/srcissors.js b/srcissors.js index eb6bdad..2fc156c 100644 --- a/srcissors.js +++ b/srcissors.js @@ -1,2 +1,2 @@ -!function(i,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?exports.srcissors=t(require("jquery")):i.srcissors=t(i.jQuery)}(window,(function(i){return function(i){var t={};function e(s){if(t[s])return t[s].exports;var n=t[s]={i:s,l:!1,exports:{}};return i[s].call(n.exports,n,n.exports,e),n.l=!0,n.exports}return e.m=i,e.c=t,e.d=function(i,t,s){e.o(i,t)||Object.defineProperty(i,t,{enumerable:!0,get:s})},e.r=function(i){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},e.t=function(i,t){if(1&t&&(i=e(i)),8&t)return i;if(4&t&&"object"==typeof i&&i&&i.__esModule)return i;var s=Object.create(null);if(e.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:i}),2&t&&"string"!=typeof i)for(var n in i)e.d(s,n,function(t){return i[t]}.bind(null,n));return s},e.n=function(i){var t=i&&i.__esModule?function(){return i.default}:function(){return i};return e.d(t,"a",t),t},e.o=function(i,t){return Object.prototype.hasOwnProperty.call(i,t)},e.p="",e(e.s=1)}([function(t,e){t.exports=i},function(i,t,e){var s=e(0),n=e(2);i.exports={new:function(i){var t=i.arena,e=i.url,h=i.fixedWidth,o=i.fixedHeight,a=i.minWidth,r=i.minHeight,u=i.minRatio,c=i.maxRatio,l=i.maxArea,g=i.zoomStep,d=i.crop,v=i.actions,m=i.minResolution,w=i.surroundingImageOpacity,p=i.showSurroundingImage,f=(t=s(t)).find(".crop-view"),y=f.find(".crop-preview"),x=s("");y.append(x);var k=f.find(".crop-outline");k.length||(k=void 0);var R={pan:!0,zoomOnDoubleClick:!0,resize:!0,resizeHorizontal:!h,resizeVertical:!o};return s.extend(R,v),null==g&&(g=1.25),null==a&&(a=50),null==r&&(r=50),new n({url:e,crop:d,arena:t,view:f,img:x,outline:k,showSurroundingImage:p,surroundingImageOpacity:w,fixedWidth:h,fixedHeight:o,minViewWidth:a,minViewHeight:r,minViewRatio:u,maxViewRatio:c,maxArea:l,zoomStep:g,actions:R,minResolution:m})}}},function(i,t,e){function s(i,t){var e;if("undefined"==typeof Symbol||null==i[Symbol.iterator]){if(Array.isArray(i)||(e=function(i,t){if(!i)return;if("string"==typeof i)return n(i,t);var e=Object.prototype.toString.call(i).slice(8,-1);"Object"===e&&i.constructor&&(e=i.constructor.name);if("Map"===e||"Set"===e)return Array.from(i);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return n(i,t)}(i))||t&&i&&"number"==typeof i.length){e&&(i=e);var s=0,h=function(){};return{s:h,n:function(){return s>=i.length?{done:!0}:{done:!1,value:i[s++]}},e:function(i){throw i},f:h}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,r=!1;return{s:function(){e=i[Symbol.iterator]()},n:function(){var i=e.next();return a=i.done,i},e:function(i){r=!0,o=i},f:function(){try{a||null==e.return||e.return()}finally{if(r)throw o}}}}function n(i,t){(null==t||t>i.length)&&(t=i.length);for(var e=0,s=new Array(t);en&&delete this.minResolution,this.minResolution){var h=this.minResolution/(this.imageHeight*this.imageHeight);(!this.minViewRatio||this.minViewRatioo)&&(this.maxViewRatio=o)}this.calcMaxMinDimensions(),this.fixedWidth&&(t="width"),this.fixedHeight&&(t="height"),this.setViewDimensions({width:this.imageWidth,height:this.imageHeight,keepDimension:t}),this.isReady=!0,this.view.removeClass(this.loadingCssClass),this.isInitialized||null==this.initialCrop?(this.zoomAllOut(),this.center()):this.setCrop(this.initialCrop),this.isInitialized=!0,this.readyEvent.fire(),this.loadEvent.fire()}},{key:"setCrop",value:function(i){var t=this,e=i.x,s=i.y,n=i.width,h=i.height;if(this.isReady){this.resize({width:n,height:h});var o=this.viewWidth/n,a=this.imageWidth*o;this.zoom({width:a}),this.pan({x:e*o,y:s*o})}else this.on("ready",(function(){return t.setCrop({x:e,y:s,width:n,height:h})}))}},{key:"getCrop",value:function(){var i=this.preview.width/this.imageWidth,t={x:this.preview.x/i,y:this.preview.y/i,width:this.viewWidth/i,height:this.viewHeight/i};return this.roundCrop(t),this.validateCrop(t),t}},{key:"roundCrop",value:function(i){for(var t in i){var e=i[t];i[t]=Math.round(e)}}},{key:"validateCrop",value:function(i){var t=i.x,e=i.y,s=i.width,n=i.height;return t+s>this.imageWidth?i.width=this.imageWidth-t:e+n>this.imageHeight&&(i.height=this.imageHeight-e),i}},{key:"setRatio",value:function(i,t){var e,s,n=this;if(this.isReady)return i=this.enforceValidRatio(i),"height"===t?s=(e=this.viewHeight)*i:e=(s=this.viewWidth)/i,this.resizeFocusPoint=this.getFocusPoint(),this.resize({width:s,height:e});this.on("ready",(function(){return n.setRatio(i,t)}))}},{key:"onPan",value:function(i){this.isPanning||(this.isPanning=!0,this.arena.addClass(this.panningCssClass),this.outline.addClass(this.outlineCssClass));var t=i.startX-i.dx,e=i.startY-i.dy;this.pan({x:t,y:e})}},{key:"onPanEnd",value:function(){return this.isPanning=!1,this.arena.removeClass(this.panningCssClass),this.outline.removeClass(this.outlineCssClass)}},{key:"onDoubleClick",value:function(i){var t=i.pageX,e=i.pageY,s=this.view[0].getBoundingClientRect(),n=t-s.left,h=e-s.top;this.zoomIn({viewX:n,viewY:h})}},{key:"onResize",value:function(i){var t=i.position,e=i.dx,s=i.dy;this.isResizing||(this.isResizing=!0,this.resizeFocusPoint=this.getFocusPoint()),["top","bottom"].includes(t)?(s*=2,this.resize({width:this.viewWidth,height:this.viewHeight+s,keepDimension:"height"})):["left","right"].includes(t)&&(e*=2,this.resize({width:this.viewWidth+e,height:this.viewHeight,keepDimension:"width"}))}},{key:"onResizeEnd",value:function(){this.isResizing=!1,this.resizeFocusPoint=void 0}},{key:"resize",value:function(i){var t=i.width,e=i.height,s=i.keepDimension;this.setViewDimensions({width:t,height:e,keepDimension:s}),this.resizeFocusPoint&&(this.resizeFocusPoint.viewX=this.viewWidth/2,this.resizeFocusPoint.viewY=this.viewHeight/2),this.zoom({width:this.preview.width,height:this.preview.height,focusPoint:this.resizeFocusPoint})}},{key:"setViewDimensions",value:function(i){var t=i.width,e=i.height,s=i.keepDimension;if(this.maxArea){var n=this.enforceMaxArea({width:t,height:e,keepDimension:s});t=n.width,e=n.height}var h=this.enforceViewDimensions({width:t,height:e,keepDimension:s});if(t=h.width,e=h.height,this.view.css({width:t,height:e}),this.viewWidth=t,this.viewHeight=e,this.viewRatio=t/e,this.minResolution){var o=Math.sqrt(this.minResolution*this.viewRatio),a=Math.sqrt(this.minResolution/this.viewRatio);this.maxImageWidth=this.viewWidth/o*this.imageWidth,this.maxImageHeight=this.viewHeight/a*this.imageHeight}this.fireChange()}},{key:"zoomAllOut",value:function(){this.isWidthRestricting()?this.zoom({width:this.viewWidth}):this.zoom({height:this.viewHeight})}},{key:"zoomIn",value:function(i){null==i&&(i={}),this.isWidthRestricting()?i.width=this.preview.width*this.zoomInStep:i.height=this.preview.height*this.zoomInStep,this.zoom(i)}},{key:"zoomOut",value:function(i){null==i&&(i={}),this.isWidthRestricting()?i.width=this.preview.width*this.zoomOutStep:i.height=this.preview.height*this.zoomOutStep,this.zoom(i)}},{key:"zoom",value:function(i){var t=i.width,e=i.height,s=i.viewX,n=i.viewY,h=i.focusPoint;null==h&&(h=this.getFocusPoint({viewX:s,viewY:n}));var o=this.enforceZoom({width:t,height:e});t=o.width,e=o.height,null!=t?(this.preview.setWidth(t),this.fireChange()):null!=e&&(this.preview.setHeight(e),this.fireChange()),this.focus(h)}},{key:"getFocusPoint",value:function(i){null==i&&(i={});var t=i,e=t.viewX,s=t.viewY;null==e&&(e=this.viewWidth/2),null==s&&(s=this.viewHeight/2);var n=this.preview.x+e,h=this.preview.y+s;return{percentX:n/this.preview.width,percentY:h/this.preview.height,viewX:e,viewY:s}}},{key:"focus",value:function(i){var t=i.percentX,e=i.percentY,s=i.viewX,n=i.viewY,h=this.preview.width*t,o=this.preview.height*e;h-=s,o-=n,this.pan({x:h,y:o})}},{key:"center",value:function(){var i=(this.preview.width-this.viewWidth)/2,t=(this.preview.height-this.viewHeight)/2;this.pan({x:i,y:t})}},{key:"pan",value:function(i){i=this.enforceXy(i),this.preview.pan(i.x,i.y),this.fireChange()}},{key:"enforceXy",value:function(i){var t=i.x,e=i.y;return t<0?t=0:t>this.preview.width-this.viewWidth&&(t=this.preview.width-this.viewWidth),e<0?e=0:e>this.preview.height-this.viewHeight&&(e=this.preview.height-this.viewHeight),{x:t,y:e}}},{key:"enforceZoom",value:function(i){var t=i.width,e=i.height;return null!=t&&this.maxImageWidth&&t>this.maxImageWidth?{width:this.maxImageWidth}:null!=t&&tthis.maxImageHeight?{height:this.maxImageHeight}:null!=e&&ethis.maxWidth||ethis.maxHeight||sthis.maxViewRatio)}},{key:"isValidRatio",value:function(i){return!(ithis.maxViewRatio)}},{key:"enforceValidRatio",value:function(i){return ithis.maxViewRatio?this.maxViewRatio:i}},{key:"enforceViewDimensions",value:function(i){var t,e,s,n=i.width,h=i.height,o=i.keepDimension;if(nthis.maxWidth&&(e=this.maxWidth),hthis.maxHeight&&(t=this.maxHeight),o){if(e&&(n=e),t&&(h=t),s=n/h,!this.isValidRatio(s)){s=this.enforceValidRatio(s);var a=this.getRatioBox({ratio:s,width:n,height:h,keepDimension:o});if(n=a.width,h=a.height,n>this.arenaWidth||h>this.arenaHeight){var r=this.centerAlign(this.maxWidth,this.maxHeight,s);n=r.width,h=r.height}}}else if(e||t){s=this.enforceValidRatio(n/h);var u=this.centerAlign(this.maxWidth,this.maxHeight,s);n=u.width,h=u.height}return{width:n,height:h}}},{key:"enforceMaxArea",value:function(i){var t=i.width,e=i.height,s=i.keepDimension,n=t/e;return"width"===s?n=t/(e=this.maxArea/t):"height"===s?n=(t=this.maxArea/e)/e:e=(t=Math.sqrt(this.maxArea*n))/n,this.isValidRatio(n)||(n=this.enforceValidRatio(n),e=(t=Math.sqrt(this.maxArea*n))/n),{width:t,height:e}}},{key:"isWidthRestricting",value:function(){return this.viewRatio>=this.imageRatio}},{key:"getRatioBox",value:function(i){var t=i.ratio,e=i.width,s=i.height,n=i.keepDimension;return"width"===n||null==s?s=e/t:"height"===n||null==e?e=s*t:s=e/t,{width:e,height:s}}},{key:"centerAlign",value:function(i,t,e){var s,n,h,o;return i/t>e?h=(i-(n=t*e))/2:o=(t-(s=i/e))/2,{x:h||0,y:o||0,width:n||i,height:s||t}}},{key:"min",value:function(i){var t,e=i[0],n=s(i);try{for(n.s();!(t=n.n()).done;){var h=t.value;h0){var e=n("").css({opacity:this.opacity}).attr("src",t);this.outline.append(e)}}},{key:"reset",value:function(){this.url=void 0,this.x=this.y=0,this.width=this.height=0,this.img.attr("src",""),this.img.css({width:"",height:"",transform:""}),this.outline&&this.outline.css({transform:""}).html("")}},{key:"setWidth",value:function(i){this.img.css({width:"".concat(i,"px"),height:"auto"});var t=i/this.ratio;this.updateImageDimensions({width:i,height:t})}},{key:"setHeight",value:function(i){this.img.css({width:"auto",height:"".concat(i,"px")});var t=i*this.ratio;this.updateImageDimensions({width:t,height:i})}},{key:"updateImageDimensions",value:function(i){var t=i.width,e=i.height;this.width=t,this.height=e,this.outline&&this.outline.css({width:"".concat(this.width,"px"),height:"".concat(this.height,"px")})}},{key:"pan",value:function(i,t){this.x=i,this.y=t;var e=Math.round(this.x),s=Math.round(this.y);this.img.css({transform:"translate(-".concat(e,"px, -").concat(s,"px)")}),this.outline&&this.outline.css({transform:"translate(-".concat(e,"px, -").concat(s,"px)")})}}])&&s(t.prototype,e),h&&s(t,h),i}()},function(i,t,e){function s(i,t){for(var e=0;es-t.doubleClickThreshold&&t.parent.onDoubleClick(h(e)),i=s}))}},{key:"preventBrowserDragDrop",value:function(){this.view.on("dragstart.srcissors",(function(){return!1}))}},{key:"resizeView",value:function(i){var t=this,e=i.horizontal,s=i.vertical,h=n("
");h.addClass("resize-handler");var o=[];e&&(o=o.concat(["right","left"])),s&&(o=o.concat(["top","bottom"])),o.forEach((function(i){var e=h.clone();e.addClass("resize-handler-".concat(i)),e.on("mousedown.srcissors touchstart.srcissors",t.getResizeMouseDown(i)),t.view.append(e)}))}},{key:"getResizeMouseDown",value:function(i){var t=this,e=n(document);return function(s){var n=h(s),o=n.pageX,a=n.pageY;s.stopPropagation(),e.on("mousemove.srcissors-resize touchmove.srcissors-resize",(function(e){var s,n,r=h(e),u=r.pageX,c=r.pageY;switch(i){case"top":case"bottom":n=c-a,"top"===i&&(n=-n),a=c;break;case"left":case"right":s=u-o,"left"===i&&(s=-s),o=u}t.parent.onResize({position:i,dx:s,dy:n})})).on("mouseup.srcissors-resize touchend.srcissors-resize",(function(){e.off("mouseup.srcissors-resize touchmove.srcissors-resize"),e.off("mousemove.srcissors-resize touchend.srcissors-resize"),t.parent.onResizeEnd({position:i})}))}}},{key:"responsiveArena",value:function(){}}])&&s(t.prototype,e),o&&s(t,o),i}()}])})); +!function(i,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?exports.srcissors=t(require("jquery")):i.srcissors=t(i.jQuery)}(window,(function(i){return function(i){var t={};function e(s){if(t[s])return t[s].exports;var n=t[s]={i:s,l:!1,exports:{}};return i[s].call(n.exports,n,n.exports,e),n.l=!0,n.exports}return e.m=i,e.c=t,e.d=function(i,t,s){e.o(i,t)||Object.defineProperty(i,t,{enumerable:!0,get:s})},e.r=function(i){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},e.t=function(i,t){if(1&t&&(i=e(i)),8&t)return i;if(4&t&&"object"==typeof i&&i&&i.__esModule)return i;var s=Object.create(null);if(e.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:i}),2&t&&"string"!=typeof i)for(var n in i)e.d(s,n,function(t){return i[t]}.bind(null,n));return s},e.n=function(i){var t=i&&i.__esModule?function(){return i.default}:function(){return i};return e.d(t,"a",t),t},e.o=function(i,t){return Object.prototype.hasOwnProperty.call(i,t)},e.p="",e(e.s=1)}([function(t,e){t.exports=i},function(i,t,e){var s=e(0),n=e(2);i.exports={new:function(i){var t=i.arena,e=i.url,h=i.fixedWidth,o=i.fixedHeight,a=i.minWidth,r=i.minHeight,u=i.minRatio,c=i.maxRatio,l=i.maxArea,d=i.zoomStep,g=i.crop,v=i.actions,m=i.minResolution,w=i.surroundingImageOpacity,p=i.showSurroundingImage,f=(t=s(t)).find(".crop-view"),y=f.find(".crop-preview"),x=s("");y.append(x);var k=f.find(".crop-outline");k.length||(k=void 0);var R={pan:!0,zoomOnDoubleClick:!0,resize:!0,resizeHorizontal:!h,resizeVertical:!o};return s.extend(R,v),null==d&&(d=1.25),null==a&&(a=50),null==r&&(r=50),new n({url:e,crop:g,arena:t,view:f,img:x,outline:k,showSurroundingImage:p,surroundingImageOpacity:w,fixedWidth:h,fixedHeight:o,minViewWidth:a,minViewHeight:r,minViewRatio:u,maxViewRatio:c,maxArea:l,zoomStep:d,actions:R,minResolution:m})}}},function(i,t,e){function s(i,t){var e;if("undefined"==typeof Symbol||null==i[Symbol.iterator]){if(Array.isArray(i)||(e=function(i,t){if(!i)return;if("string"==typeof i)return n(i,t);var e=Object.prototype.toString.call(i).slice(8,-1);"Object"===e&&i.constructor&&(e=i.constructor.name);if("Map"===e||"Set"===e)return Array.from(i);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return n(i,t)}(i))||t&&i&&"number"==typeof i.length){e&&(i=e);var s=0,h=function(){};return{s:h,n:function(){return s>=i.length?{done:!0}:{done:!1,value:i[s++]}},e:function(i){throw i},f:h}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,r=!1;return{s:function(){e=i[Symbol.iterator]()},n:function(){var i=e.next();return a=i.done,i},e:function(i){r=!0,o=i},f:function(){try{a||null==e.return||e.return()}finally{if(r)throw o}}}}function n(i,t){(null==t||t>i.length)&&(t=i.length);for(var e=0,s=new Array(t);en&&delete this.minResolution,this.minResolution){var h=this.minResolution/(this.imageHeight*this.imageHeight);(!this.minViewRatio||this.minViewRatioo)&&(this.maxViewRatio=o)}this.calcMaxMinDimensions(),this.fixedWidth&&(t="width"),this.fixedHeight&&(t="height"),this.setViewDimensions({width:this.imageWidth,height:this.imageHeight,keepDimension:t}),this.isReady=!0,this.view.removeClass(this.loadingCssClass),this.isInitialized||null==this.initialCrop?(this.zoomAllOut(),this.center()):this.setCrop(this.initialCrop),this.isInitialized=!0,this.readyEvent.fire(),this.loadEvent.fire()}},{key:"setCrop",value:function(i){var t=this,e=i.x,s=i.y,n=i.width,h=i.height;if(this.isReady){this.resize({width:n,height:h});var o=this.viewWidth/n,a=this.imageWidth*o;this.zoom({width:a}),this.pan({x:e*o,y:s*o})}else this.on("ready",(function(){return t.setCrop({x:e,y:s,width:n,height:h})}))}},{key:"getCrop",value:function(){var i=this.preview.width/this.imageWidth,t={x:this.preview.x/i,y:this.preview.y/i,width:this.viewWidth/i,height:this.viewHeight/i};return this.roundCrop(t),this.validateCrop(t),t}},{key:"roundCrop",value:function(i){for(var t in i){var e=i[t];i[t]=Math.round(e)}}},{key:"validateCrop",value:function(i){var t=i.x,e=i.y,s=i.width,n=i.height;return t+s>this.imageWidth?i.width=this.imageWidth-t:e+n>this.imageHeight&&(i.height=this.imageHeight-e),i}},{key:"setRatio",value:function(i,t){var e,s,n=this;if(this.isReady)return i=this.enforceValidRatio(i),"height"===t?s=(e=this.viewHeight)*i:e=(s=this.viewWidth)/i,this.resizeFocusPoint=this.getFocusPoint(),this.resize({width:s,height:e});this.on("ready",(function(){return n.setRatio(i,t)}))}},{key:"onPan",value:function(i){this.isPanning||(this.isPanning=!0,this.arena.addClass(this.panningCssClass),this.outline.addClass(this.outlineCssClass));var t=i.startX-i.dx,e=i.startY-i.dy;this.pan({x:t,y:e})}},{key:"onPanEnd",value:function(){return this.isPanning=!1,this.arena.removeClass(this.panningCssClass),this.outline.removeClass(this.outlineCssClass)}},{key:"onDoubleClick",value:function(i){var t=i.pageX,e=i.pageY,s=this.view[0].getBoundingClientRect(),n=t-s.left,h=e-s.top;this.zoomIn({viewX:n,viewY:h})}},{key:"onResize",value:function(i){var t=i.position,e=i.dx,s=i.dy;this.isResizing||(this.isResizing=!0,this.resizeFocusPoint=this.getFocusPoint()),["top","bottom"].includes(t)?(s*=2,this.resize({width:this.viewWidth,height:this.viewHeight+s,keepDimension:"height"})):["left","right"].includes(t)&&(e*=2,this.resize({width:this.viewWidth+e,height:this.viewHeight,keepDimension:"width"}))}},{key:"onResizeEnd",value:function(){this.isResizing=!1,this.resizeFocusPoint=void 0}},{key:"resize",value:function(i){var t=i.width,e=i.height,s=i.keepDimension;this.setViewDimensions({width:t,height:e,keepDimension:s}),this.resizeFocusPoint&&(this.resizeFocusPoint.viewX=this.viewWidth/2,this.resizeFocusPoint.viewY=this.viewHeight/2),this.zoom({width:this.preview.width,height:this.preview.height,focusPoint:this.resizeFocusPoint})}},{key:"setViewDimensions",value:function(i){var t=i.width,e=i.height,s=i.keepDimension;if(this.maxArea){var n=this.enforceMaxArea({width:t,height:e,keepDimension:s});t=n.width,e=n.height}var h=this.enforceViewDimensions({width:t,height:e,keepDimension:s});if(t=h.width,e=h.height,this.view.css({width:t,height:e}),this.viewWidth=t,this.viewHeight=e,this.viewRatio=t/e,this.minResolution){var o=Math.sqrt(this.minResolution*this.viewRatio),a=Math.sqrt(this.minResolution/this.viewRatio);this.maxImageWidth=this.viewWidth/o*this.imageWidth,this.maxImageHeight=this.viewHeight/a*this.imageHeight}this.fireChange()}},{key:"zoomAllOut",value:function(){this.isWidthRestricting()?this.zoom({width:this.viewWidth}):this.zoom({height:this.viewHeight})}},{key:"zoomIn",value:function(i){null==i&&(i={}),this.isWidthRestricting()?i.width=this.preview.width*this.zoomInStep:i.height=this.preview.height*this.zoomInStep,this.zoom(i)}},{key:"zoomOut",value:function(i){null==i&&(i={}),this.isWidthRestricting()?i.width=this.preview.width*this.zoomOutStep:i.height=this.preview.height*this.zoomOutStep,this.zoom(i)}},{key:"zoom",value:function(i){var t=i.width,e=i.height,s=i.viewX,n=i.viewY,h=i.focusPoint;null==h&&(h=this.getFocusPoint({viewX:s,viewY:n}));var o=this.enforceZoom({width:t,height:e});t=o.width,e=o.height,null!=t?(this.preview.setWidth(t),this.fireChange()):null!=e&&(this.preview.setHeight(e),this.fireChange()),this.focus(h)}},{key:"getFocusPoint",value:function(i){null==i&&(i={});var t=i,e=t.viewX,s=t.viewY;null==e&&(e=this.viewWidth/2),null==s&&(s=this.viewHeight/2);var n=this.preview.x+e,h=this.preview.y+s;return{percentX:n/this.preview.width,percentY:h/this.preview.height,viewX:e,viewY:s}}},{key:"focus",value:function(i){var t=i.percentX,e=i.percentY,s=i.viewX,n=i.viewY,h=this.preview.width*t,o=this.preview.height*e;h-=s,o-=n,this.pan({x:h,y:o})}},{key:"center",value:function(){var i=(this.preview.width-this.viewWidth)/2,t=(this.preview.height-this.viewHeight)/2;this.pan({x:i,y:t})}},{key:"pan",value:function(i){i=this.enforceXy(i),this.preview.pan(i.x,i.y),this.fireChange()}},{key:"enforceXy",value:function(i){var t=i.x,e=i.y;return t<0?t=0:t>this.preview.width-this.viewWidth&&(t=this.preview.width-this.viewWidth),e<0?e=0:e>this.preview.height-this.viewHeight&&(e=this.preview.height-this.viewHeight),{x:t,y:e}}},{key:"enforceZoom",value:function(i){var t=i.width,e=i.height;return null!=t&&this.maxImageWidth&&t>this.maxImageWidth?{width:this.maxImageWidth}:null!=t&&tthis.maxImageHeight?{height:this.maxImageHeight}:null!=e&&ethis.maxWidth||ethis.maxHeight||sthis.maxViewRatio)}},{key:"isValidRatio",value:function(i){return!(ithis.maxViewRatio)}},{key:"enforceValidRatio",value:function(i){return ithis.maxViewRatio?this.maxViewRatio:i}},{key:"enforceViewDimensions",value:function(i){var t,e,s,n=i.width,h=i.height,o=i.keepDimension;if(nthis.maxWidth&&(e=this.maxWidth),hthis.maxHeight&&(t=this.maxHeight),o){if(e&&(n=e),t&&(h=t),s=n/h,!this.isValidRatio(s)){s=this.enforceValidRatio(s);var a=this.getRatioBox({ratio:s,width:n,height:h,keepDimension:o});if(n=a.width,h=a.height,n>this.arenaWidth||h>this.arenaHeight){var r=this.centerAlign(this.maxWidth,this.maxHeight,s);n=r.width,h=r.height}}}else if(e||t){s=this.enforceValidRatio(n/h);var u=this.centerAlign(this.maxWidth,this.maxHeight,s);n=u.width,h=u.height}return{width:n,height:h}}},{key:"enforceMaxArea",value:function(i){var t=i.width,e=i.height,s=i.keepDimension,n=t/e;return"width"===s?n=t/(e=this.maxArea/t):"height"===s?n=(t=this.maxArea/e)/e:e=(t=Math.sqrt(this.maxArea*n))/n,this.isValidRatio(n)||(n=this.enforceValidRatio(n),e=(t=Math.sqrt(this.maxArea*n))/n),{width:t,height:e}}},{key:"isWidthRestricting",value:function(){return this.viewRatio>=this.imageRatio}},{key:"getRatioBox",value:function(i){var t=i.ratio,e=i.width,s=i.height,n=i.keepDimension;return"width"===n||null==s?s=e/t:"height"===n||null==e?e=s*t:s=e/t,{width:e,height:s}}},{key:"centerAlign",value:function(i,t,e){var s,n,h,o;return i/t>e?h=(i-(n=t*e))/2:o=(t-(s=i/e))/2,{x:h||0,y:o||0,width:n||i,height:s||t}}},{key:"min",value:function(i){var t,e=i[0],n=s(i);try{for(n.s();!(t=n.n()).done;){var h=t.value;h0){var e=n("").css({opacity:this.opacity}).attr("src",t);this.outline.append(e)}}},{key:"reset",value:function(){this.url=void 0,this.x=this.y=0,this.width=this.height=0,this.img.attr("src",""),this.img.css({width:"",height:"",transform:""}),this.outline&&this.outline.css({transform:""}).html("")}},{key:"setWidth",value:function(i){this.img.css({width:"".concat(i,"px"),height:"auto"});var t=i/this.ratio;this.updateImageDimensions({width:i,height:t})}},{key:"setHeight",value:function(i){this.img.css({width:"auto",height:"".concat(i,"px")});var t=i*this.ratio;this.updateImageDimensions({width:t,height:i})}},{key:"updateImageDimensions",value:function(i){var t=i.width,e=i.height;this.width=t,this.height=e,this.outline&&this.outline.css({width:"".concat(this.width,"px"),height:"".concat(this.height,"px")})}},{key:"pan",value:function(i,t){this.x=i,this.y=t;var e=Math.round(this.x),s=Math.round(this.y);this.img.css({transform:"translate(-".concat(e,"px, -").concat(s,"px)")}),this.outline&&this.outline.css({transform:"translate(-".concat(e,"px, -").concat(s,"px)")})}}])&&s(t.prototype,e),h&&s(t,h),i}()},function(i,t,e){function s(i,t){for(var e=0;es-t.doubleClickThreshold&&t.parent.onDoubleClick(h(e)),i=s}))}},{key:"preventBrowserDragDrop",value:function(){this.view.on("dragstart.srcissors",(function(){return!1}))}},{key:"resizeView",value:function(i){var t=this,e=i.horizontal,s=i.vertical,h=n("
");h.addClass("resize-handler");var o=[];e&&(o=o.concat(["right","left"])),s&&(o=o.concat(["top","bottom"])),o.forEach((function(i){var e=h.clone();e.addClass("resize-handler-".concat(i)),e.on("mousedown.srcissors touchstart.srcissors",t.getResizeMouseDown(i)),t.view.append(e)}))}},{key:"getResizeMouseDown",value:function(i){var t=this,e=n(document);return function(s){var n=h(s),o=n.pageX,a=n.pageY;s.stopPropagation(),e.on("mousemove.srcissors-resize touchmove.srcissors-resize",(function(e){var s,n,r=h(e),u=r.pageX,c=r.pageY;switch(i){case"top":case"bottom":n=c-a,"top"===i&&(n=-n),a=c;break;case"left":case"right":s=u-o,"left"===i&&(s=-s),o=u}t.parent.onResize({position:i,dx:s,dy:n})})).on("mouseup.srcissors-resize touchend.srcissors-resize",(function(){e.off("mouseup.srcissors-resize touchmove.srcissors-resize"),e.off("mousemove.srcissors-resize touchend.srcissors-resize"),t.parent.onResizeEnd({position:i})}))}}},{key:"responsiveArena",value:function(){}}])&&s(t.prototype,e),o&&s(t,o),i}()}])})); //# sourceMappingURL=srcissors.js.map \ No newline at end of file diff --git a/srcissors.js.map b/srcissors.js.map index 39d7e8a..3a8aa14 100644 --- a/srcissors.js.map +++ b/srcissors.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://srcissors/srcissors.js"],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__0__","modules","installedModules","__webpack_require__","moduleId","i","l","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","$","Crop","new","_ref","arena","url","fixedWidth","fixedHeight","minWidth","minHeight","minRatio","maxRatio","maxArea","zoomStep","crop","actions","minResolution","surroundingImageOpacity","showSurroundingImage","view","find","preview","img","append","outline","length","undefined","allowedActions","pan","zoomOnDoubleClick","resize","resizeHorizontal","resizeVertical","extend","minViewWidth","minViewHeight","minViewRatio","maxViewRatio","_createForOfIteratorHelper","allowArrayLike","it","iterator","Array","isArray","minLen","_arrayLikeToArray","toString","slice","constructor","from","test","_unsupportedIterableToArray","F","done","e","_e","f","TypeError","err","normalCompletion","didErr","step","next","_e2","return","arr","len","arr2","_defineProperties","target","props","descriptor","configurable","writable","Preview","Events","instance","Constructor","_classCallCheck","this","onPreviewReady","loadingCssClass","panningCssClass","outlineCssClass","isPanning","initialCrop","loadEvent","Callbacks","changeEvent","initializeReadyState","zoomInStep","zoomOutStep","arenaWidth","width","arenaHeight","height","setSurroundingImageVisibility","onReady","opacity","setImage","protoProps","staticProps","isReady","readyEvent","empty","isInitialized","reset","addClass","visibility","parseFloat","css","imageWidth","imageHeight","zoomAllOut","_ref2","keepDimension","events","parent","imageRatio","imageResolution","minRatioForResolution","maxRatioForResolution","calcMaxMinDimensions","setViewDimensions","removeClass","center","setCrop","fire","_ref3","_this","x","y","factor","viewWidth","previewWidth","zoom","on","viewHeight","roundCrop","validateCrop","Math","round","ratio","_this2","enforceValidRatio","resizeFocusPoint","getFocusPoint","setRatio","data","newX","startX","dx","newY","startY","dy","_ref4","pageX","pageY","_this$view$0$getBound","getBoundingClientRect","viewX","left","viewY","top","zoomIn","_ref5","position","isResizing","includes","_ref6","focusPoint","_ref7","_this$enforceMaxArea","enforceMaxArea","_this$enforceViewDime","enforceViewDimensions","viewRatio","minZoomPixelWidth","sqrt","minZoomPixelHeight","maxImageWidth","maxImageHeight","fireChange","isWidthRestricting","params","_ref8","_this$enforceZoom","enforceZoom","setWidth","setHeight","focus","param","_param","percentX","percentY","_ref9","enforceXy","_ref10","_ref11","maxWidth","min","maxHeight","_ref12","_ref13","newHeight","newWidth","isValidRatio","_this$getRatioBox","getRatioBox","_this$centerAlign","centerAlign","_this$centerAlign2","_ref14","_ref15","areaWidth","areaHeight","array","_step","_iterator","number","callback","concat","add","remove","_this3","changeDispatch","setTimeout","getCrop","num","obj","image","previewXy","console","log","updateImageDimensions","show","attr","setBackgroundImage","bgImg","transform","html","x1","y1","getPageCoordinates","event","type","originalEvent","changedTouches","horizontal","vertical","doubleClickThreshold","doubleClick","resizeView","preventBrowserDragDrop","responsiveArena","$doc","document","e1","panData","preventDefault","e2","_getPageCoordinates","_getPageCoordinates2","prevPageX","prevPageY","onPan","off","onPanEnd","lastClick","now","Date","getTime","onDoubleClick","$template","positions","forEach","$handler","clone","getResizeMouseDown","_this4","_getPageCoordinates3","lastX","lastY","stopPropagation","_getPageCoordinates4","onResize","onResizeEnd"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,WACR,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,UAAWJ,GACO,iBAAZC,QACdA,QAAmB,UAAID,EAAQG,QAAQ,WAEvCJ,EAAgB,UAAIC,EAAQD,EAAa,QAR3C,CASGO,QAAQ,SAASC,GACpB,OAAgB,SAAUC,GAEhB,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUV,QAGnC,IAAIC,EAASO,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHZ,QAAS,IAUV,OANAO,EAAQG,GAAUG,KAAKZ,EAAOD,QAASC,EAAQA,EAAOD,QAASS,GAG/DR,EAAOW,GAAI,EAGJX,EAAOD,QA0Df,OArDAS,EAAoBK,EAAIP,EAGxBE,EAAoBM,EAAIP,EAGxBC,EAAoBO,EAAI,SAAShB,EAASiB,EAAMC,GAC3CT,EAAoBU,EAAEnB,EAASiB,IAClCG,OAAOC,eAAerB,EAASiB,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhET,EAAoBe,EAAI,SAASxB,GACX,oBAAXyB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAerB,EAASyB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAerB,EAAS,aAAc,CAAE2B,OAAO,KAQvDlB,EAAoBmB,EAAI,SAASD,EAAOE,GAEvC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U7G,GAC1B,IAAI8G,EAAWH,EAAUI,QACzBD,EAASzK,SAAS,kBAAkBkH,OAAOvD,IAC3C8G,EAAS5I,GAAG,2CAA4CwF,EAAOsD,mBAAmBhH,IAElF0D,EAAO7M,KAAKI,OAAO6P,QAGtB,CACD7R,IAAK,qBACLN,MAAO,SAA4BqL,GACjC,IAAIiH,EAASxM,KAETgL,EAAO/P,EAAEgQ,UACb,OAAO,SAAUZ,GACf,IAAIoC,EAAuBrC,EAAmBC,GAC1CqC,EAAQD,EAAqB5H,MAC7B8H,EAAQF,EAAqB3H,MAEjCuF,EAAMuC,kBACN5B,EAAKvH,GAAG,yDAAyD,SAAU4H,GACzE,IAAI7G,EAAIG,EAEJkI,EAAuBzC,EAAmBiB,GAC1CxG,EAAQgI,EAAqBhI,MAC7BC,EAAQ+H,EAAqB/H,MAEjC,OAAQS,GACN,IAAK,MACL,IAAK,SACHZ,EAAKG,EAAQ6H,EAEI,QAAbpH,IACFZ,GAAMA,GAGRgI,EAAQ7H,EACR,MAEF,IAAK,OACL,IAAK,QACHN,EAAKK,EAAQ6H,EAEI,SAAbnH,IACFf,GAAMA,GAGRkI,EAAQ7H,EAIZ2H,EAAOlK,OAAOwK,SAAS,CACrBvH,SAAUA,EACVf,GAAIA,EACJG,GAAIA,OAELlB,GAAG,sDAAsD,WAC1DuH,EAAKW,IAAI,uDACTX,EAAKW,IAAI,wDAETa,EAAOlK,OAAOyK,YAAY,CACxBxH,SAAUA,UAKjB,CACD/K,IAAK,kBACLN,MAAO,iBAnMmEmF,EAAkBS,EAAYjF,UAAWwG,GAAiBC,GAAajC,EAAkBS,EAAawB,GAsM3K1B,EApLqB","file":"./srcissors.js","sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://srcissors/srcissors.js"],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__0__","modules","installedModules","__webpack_require__","moduleId","i","l","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","$","Crop","new","_ref","arena","url","fixedWidth","fixedHeight","minWidth","minHeight","minRatio","maxRatio","maxArea","zoomStep","crop","actions","minResolution","surroundingImageOpacity","showSurroundingImage","view","find","preview","img","append","outline","length","undefined","allowedActions","pan","zoomOnDoubleClick","resize","resizeHorizontal","resizeVertical","extend","minViewWidth","minViewHeight","minViewRatio","maxViewRatio","_createForOfIteratorHelper","allowArrayLike","it","iterator","Array","isArray","minLen","_arrayLikeToArray","toString","slice","constructor","from","test","_unsupportedIterableToArray","F","done","e","_e","f","TypeError","err","normalCompletion","didErr","step","next","_e2","return","arr","len","arr2","_defineProperties","target","props","descriptor","configurable","writable","Preview","Events","instance","Constructor","_classCallCheck","this","onPreviewReady","loadingCssClass","panningCssClass","outlineCssClass","isPanning","initialCrop","loadEvent","Callbacks","changeEvent","initializeReadyState","zoomInStep","zoomOutStep","arenaWidth","width","arenaHeight","height","setSurroundingImageVisibility","onReady","opacity","setImage","protoProps","staticProps","isReady","readyEvent","empty","isInitialized","reset","addClass","visibility","parseFloat","css","imageWidth","imageHeight","zoomAllOut","_ref2","keepDimension","events","parent","imageRatio","imageResolution","minRatioForResolution","maxRatioForResolution","calcMaxMinDimensions","setViewDimensions","removeClass","center","setCrop","fire","_ref3","_this","x","y","factor","viewWidth","previewWidth","zoom","on","viewHeight","roundCrop","validateCrop","Math","round","ratio","_this2","enforceValidRatio","resizeFocusPoint","getFocusPoint","setRatio","data","newX","startX","dx","newY","startY","dy","_ref4","pageX","pageY","_this$view$0$getBound","getBoundingClientRect","viewX","left","viewY","top","zoomIn","_ref5","position","isResizing","includes","_ref6","focusPoint","_ref7","_this$enforceMaxArea","enforceMaxArea","_this$enforceViewDime","enforceViewDimensions","viewRatio","minZoomPixelWidth","sqrt","minZoomPixelHeight","maxImageWidth","maxImageHeight","fireChange","isWidthRestricting","params","_ref8","_this$enforceZoom","enforceZoom","setWidth","setHeight","focus","param","_param","percentX","percentY","_ref9","enforceXy","_ref10","_ref11","maxWidth","min","maxHeight","_ref12","_ref13","newHeight","newWidth","isValidRatio","_this$getRatioBox","getRatioBox","_this$centerAlign","centerAlign","_this$centerAlign2","_ref14","_ref15","areaWidth","areaHeight","array","_step","_iterator","number","callback","concat","add","remove","_this3","changeDispatch","setTimeout","getCrop","num","obj","image","previewXy","console","log","updateImageDimensions","show","attr","setBackgroundImage","bgImg","transform","html","x1","y1","getPageCoordinates","event","type","originalEvent","changedTouches","horizontal","vertical","doubleClickThreshold","doubleClick","resizeView","preventBrowserDragDrop","responsiveArena","$doc","document","e1","panData","preventDefault","e2","_getPageCoordinates","_getPageCoordinates2","prevPageX","prevPageY","onPan","off","onPanEnd","lastClick","now","Date","getTime","onDoubleClick","$template","positions","forEach","$handler","clone","getResizeMouseDown","_this4","_getPageCoordinates3","lastX","lastY","stopPropagation","_getPageCoordinates4","onResize","onResizeEnd"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,WACR,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,UAAWJ,GACO,iBAAZC,QACdA,QAAmB,UAAID,EAAQG,QAAQ,WAEvCJ,EAAgB,UAAIC,EAAQD,EAAa,QAR3C,CASGO,QAAQ,SAASC,GACpB,OAAgB,SAAUC,GAEhB,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUV,QAGnC,IAAIC,EAASO,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHZ,QAAS,IAUV,OANAO,EAAQG,GAAUG,KAAKZ,EAAOD,QAASC,EAAQA,EAAOD,QAASS,GAG/DR,EAAOW,GAAI,EAGJX,EAAOD,QA0Df,OArDAS,EAAoBK,EAAIP,EAGxBE,EAAoBM,EAAIP,EAGxBC,EAAoBO,EAAI,SAAShB,EAASiB,E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