CoreFiles by mySites.guru
rotate-es5.min.js1 lines, 1,788 bytes, from Joomla_4.2.2-Stable-Full_Package.zip
Raw History Compare with 4.2.1
md5
031eff477d7cafc4e11fa6ffdcd47bc0
sha1
e1734c8757197a7b4b4419f5328da3584498373c
sha256
e9057749c7692cf9ae18119a185dd23d7ffedbffea4ba1933595597b08c33f3e
!function(){"use strict";var t=!1,e=function(t,e){var a=document.createElement("canvas");t>=0&&t<45||t>=135&&t<225||t>=315&&t<=360?(a.width=e.naturalWidth,a.height=e.naturalHeight):(a.width=e.naturalHeight,a.height=e.naturalWidth);var n=a.getContext("2d");n.clearRect(0,0,a.width,a.height),n.translate(a.width/2,a.height/2),n.rotate(t*Math.PI/180),n.drawImage(e,-e.naturalWidth/2,-e.naturalHeight/2);var i="jpg"===Joomla.MediaManager.Edit.original.extension?"jpeg":"jpg",r=document.getElementById("jform_rotate_quality").value;Joomla.MediaManager.Edit.current.contents=a.toDataURL("image/"+i,r),e.width=a.width,e.height=a.height,e.src="",requestAnimationFrame((function(){return requestAnimationFrame((function(){e.src=Joomla.MediaManager.Edit.current.contents}))})),document.getElementById("jform_rotate_a").value=t,window.dispatchEvent(new Event("mediaManager.history.point")),a=null};window.addEventListener("media-manager-edit-init",(function(){Joomla.MediaManager.Edit.plugins.rotate={Activate:function(a){return new Promise((function(n){!function(a){t||(document.getElementById("jform_rotate_a").addEventListener("change",(function(t){var n=t.target;e(parseInt(n.value,10),a),n.value=0,[].slice.call(document.querySelectorAll("#jform_rotate_distinct label")).forEach((function(t){t.classList.remove("active"),t.classList.remove("focus")}))})),[].slice.call(document.querySelectorAll("#jform_rotate_distinct [type=radio]")).forEach((function(t){t.addEventListener("click",(function(t){var n=t.target;e(parseInt(n.value,10),a),[].slice.call(document.querySelectorAll("#jform_rotate_distinct label")).forEach((function(t){t.classList.remove("active"),t.classList.remove("focus")}))}))})),t=!0)}(a),n()}))},Deactivate:function(){return new Promise((function(t){t()}))}}}),{once:!0})}();

The same content is in 93 releases, Joomla 4.0.0-rc5 to 5.0.0-alpha1. See them all, or every version of this file.