CoreFiles by mySites.guru
crop.min.js1 lines, 2,327 bytes, from Joomla_4.0.0-alpha12-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha11
md5
158465b99054b4d6420f1c18606924b0
sha1
319130f3c1fb77aa2d6a5373c60b7c2fc48c47b2
sha256
de408e188b7b8f538491db7a0625dfca27d9d5eeb1b0ca3b096a4d0da2e7d080
Joomla=window.Joomla||{},Joomla.MediaManager=Joomla.MediaManager||{},Joomla.MediaManager.Edit=Joomla.MediaManager.Edit||{},function(){'use strict';var a=function(){var 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 crop(a){var b=Math.round;document.getElementById("jform_crop_x").value=b(a.detail.x),document.getElementById("jform_crop_y").value=b(a.detail.y),document.getElementById("jform_crop_width").value=b(a.detail.width),document.getElementById("jform_crop_height").value=b(a.detail.height);var c="jpg"===Joomla.MediaManager.Edit.original.extension?"jpeg":Joomla.MediaManager.Edit.original.extension,d=document.getElementById("jform_crop_quality").value;Joomla.MediaManager.Edit.current.contents=this.cropper.getCroppedCanvas().toDataURL("image/".concat(c),d),window.dispatchEvent(new Event("mediaManager.history.point"))}}),document.getElementById("jform_crop_x").addEventListener("change",function(a){Joomla.MediaManager.Edit.crop.cropper.setData({x:parseInt(a.target.value,10)})}),document.getElementById("jform_crop_y").addEventListener("change",function(a){Joomla.MediaManager.Edit.crop.cropper.setData({y:parseInt(a.target.value,10)})}),document.getElementById("jform_crop_width").addEventListener("change",function(a){Joomla.MediaManager.Edit.crop.cropper.setData({width:parseInt(a.target.value,10)})}),document.getElementById("jform_crop_height").addEventListener("change",function(a){Joomla.MediaManager.Edit.crop.cropper.setData({height:parseInt(a.target.value,10)})}),document.getElementById("jform_aspectRatio").addEventListener("change",function(a){Joomla.MediaManager.Edit.crop.cropper.setAspectRatio(a.target.value)}),a.addEventListener("load",function(){var b=[].slice.call(document.querySelectorAll(".crop-aspect-ratio-option")),c=a.naturalWidth/a.naturalHeight;!Number.isNaN(c)&&Number.isFinite(c)&&(b[0].value=c),Joomla.MediaManager.Edit.crop.cropper.setAspectRatio(b[0].value)})};Joomla.MediaManager.Edit.crop={Activate:function Activate(b){a(b)},Deactivate:function Deactivate(){Joomla.MediaManager.Edit.crop.cropper&&Joomla.MediaManager.Edit.crop.cropper.destroy()}}}();

The same content is in 5 releases, Joomla 4.0.0-alpha8 to 4.0.0-alpha12. See them all, or every version of this file.