CoreFiles by mySites.guru
crop-es5.min.js1 lines, 2,345 bytes, from Joomla_4.0.0-rc4-Release_Candidate-Full_Package.zip
Raw History Compare with 4.0.0-rc3
md5
7d2fc65047922c5626b4dcda5dbe0080
sha1
e24cc5d85e4b41ebb49473acd438e81841c11e57
sha256
55c7e6eac44c5d963ddad4982226b80e8740200717f676966ed744eca4bd5cf6
!function(){"use strict";Joomla=window.Joomla||{},Joomla.MediaManager=Joomla.MediaManager||{},Joomla.MediaManager.Edit=Joomla.MediaManager.Edit||{},Joomla.MediaManager.Edit.crop={Activate:function(e){var a;a=document.getElementById("image-preview"),Joomla.MediaManager.Edit.crop.cropper=new Cropper(a,{viewMode:1,responsive:!0,restore:!0,autoCrop:!0,movable:!1,zoomable:!1,rotatable:!1,autoCropArea:1,minContainerWidth:a.offsetWidth,minContainerHeight:a.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 a="jpg"===Joomla.MediaManager.Edit.original.extension?"jpeg":Joomla.MediaManager.Edit.original.extension,t=document.getElementById("jform_crop_quality").value;Joomla.MediaManager.Edit.current.contents=this.cropper.getCroppedCanvas().toDataURL("image/"+a,t),window.dispatchEvent(new Event("mediaManager.history.point"))}}),document.getElementById("jform_crop_x").addEventListener("change",(function(e){var a=e.target;Joomla.MediaManager.Edit.crop.cropper.setData({x:parseInt(a.value,10)})})),document.getElementById("jform_crop_y").addEventListener("change",(function(e){var a=e.target;Joomla.MediaManager.Edit.crop.cropper.setData({y:parseInt(a.value,10)})})),document.getElementById("jform_crop_width").addEventListener("change",(function(e){var a=e.target;Joomla.MediaManager.Edit.crop.cropper.setData({width:parseInt(a.value,10)})})),document.getElementById("jform_crop_height").addEventListener("change",(function(e){var a=e.target;Joomla.MediaManager.Edit.crop.cropper.setData({height:parseInt(a.value,10)})})),document.getElementById("jform_aspectRatio").addEventListener("change",(function(e){var a=e.target;Joomla.MediaManager.Edit.crop.cropper.setAspectRatio(a.value)})),a.addEventListener("load",(function(){var e=[].slice.call(document.querySelectorAll(".crop-aspect-ratio-option")),t=a.naturalWidth/a.naturalHeight;!Number.isNaN(t)&&Number.isFinite(t)&&(e[0].value=t),Joomla.MediaManager.Edit.crop.cropper.setAspectRatio(e[0].value)}))},Deactivate:function(){Joomla.MediaManager.Edit.crop.cropper&&Joomla.MediaManager.Edit.crop.cropper.destroy()}}}();

The same content is in 4 releases, Joomla 4.0.0-rc1 to 4.0.0-rc4. See them all, or every version of this file.