- md5
- 8fea06a8b1b7e90cee5ba3ad34d80132
- sha1
- 59820c8f8ce21e2301381211e731526eb54035c0
- sha256
- d8970a339d0679cf5e36ff3d1c5b8805d3ec24c805c0ff996d267676a8a0484d
Joomla=window.Joomla||{},Joomla.MediaManager=Joomla.MediaManager||{},Joomla.MediaManager.Edit=Joomla.MediaManager.Edit||{},function(){"use strict";Joomla.MediaManager.Edit.crop={Activate:function(e){var t;t=document.getElementById("image-preview"),Joomla.MediaManager.Edit.crop.cropper=new Cropper(t,{viewMode:1,responsive:!0,restore:!0,autoCrop:!0,movable:!1,zoomable:!1,rotatable:!1,autoCropArea:1,minContainerWidth:t.offsetWidth,minContainerHeight:t.offsetHeight,crop:function(e){document.getElementById("jform_crop_x").value=Math.round(e.detail.x),document.getElementById("jform_crop_y").value=Math.round(e.detail.y),document.getElementById("jform_crop_width").value=Math.round(e.detail.width),document.getElementById("jform_crop_height").value=Math.round(e.detail.height);var t="jpg"===Joomla.MediaManager.Edit.original.extension?"jpeg":Joomla.MediaManager.Edit.original.extension,a=document.getElementById("jform_crop_quality").value;Joomla.MediaManager.Edit.current.contents=this.cropper.getCroppedCanvas().toDataURL("image/"+t,a),window.dispatchEvent(new Event("mediaManager.history.point"))}}),document.getElementById("jform_crop_x").addEventListener("change",function(e){Joomla.MediaManager.Edit.crop.cropper.setData({x:parseInt(this.value)})}),document.getElementById("jform_crop_y").addEventListener("change",function(e){Joomla.MediaManager.Edit.crop.cropper.setData({y:parseInt(this.value)})}),document.getElementById("jform_crop_width").addEventListener("change",function(e){Joomla.MediaManager.Edit.crop.cropper.setData({width:parseInt(this.value)})}),document.getElementById("jform_crop_height").addEventListener("change",function(e){Joomla.MediaManager.Edit.crop.cropper.setData({height:parseInt(this.value)})}),document.getElementById("jform_aspectRatio").addEventListener("change",function(e){Joomla.MediaManager.Edit.crop.cropper.setAspectRatio(this.value)}),t.addEventListener("load",function(){var e=[].slice.call(document.querySelectorAll(".crop-aspect-ratio-option")),a=t.naturalWidth/t.naturalHeight;!isNaN(+a)&&isFinite(a)&&(e[0].value=a),Joomla.MediaManager.Edit.crop.cropper.setAspectRatio(e[0].value)})},Deactivate:function(){Joomla.MediaManager.Edit.crop.cropper&&Joomla.MediaManager.Edit.crop.cropper.destroy()}}}();
No other release has this exact content. See every version of this file.