- md5
- 8043820b71a7305d02e31ce8123600a5
- sha1
- 02b508c2fb69d2d503cba14e152ed7ab775fca63
- sha256
- 73fd682c74217ba75e409cb1a3f3fb67acbe7fca2a797711ca3ab8b148509560
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 e(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 c(b){a(b)},Deactivate:function a(){Joomla.MediaManager.Edit.crop.cropper&&Joomla.MediaManager.Edit.crop.cropper.destroy()}}}();
The same content is in 2 releases, Joomla 4.0.0-alpha6 to 4.0.0-alpha7. See them all, or every version of this file.