CoreFiles by mySites.guru
rotate.min.js1 lines, 1,472 bytes, from Joomla_4.0.0-rc1-Release_Candidate-Full_Package.zip
Raw History Compare with 3.10.12-rc1
md5
013f40401232e6f8e39e04b897e52016
sha1
09d51144065e8938ad201f7f6e80b1467e75fce8
sha256
9751c0f74d5ce18c6a86ebaa7a1f0eb2f07d23dcbc91967abc2b578ed1670f38
Joomla=window.Joomla||{},Joomla.MediaManager=Joomla.MediaManager||{},Joomla.MediaManager.Edit=Joomla.MediaManager.Edit||{},(()=>{const e=e=>{const t=document.getElementById("image-source"),a=document.createElement("canvas");e>=0&&e<45||e>=135&&e<225||e>=315&&e<=360?(a.width=t.width,a.height=t.height):(a.width=t.height,a.height=t.width);const o=a.getContext("2d");o.translate(a.width/2,a.height/2),o.rotate(e*Math.PI/180),o.drawImage(t,-t.width/2,-t.height/2);const i="jpg"===Joomla.MediaManager.Edit.original.extension?"jpeg":"jpg",n=document.getElementById("jform_rotate_quality").value;Joomla.MediaManager.Edit.current.contents=a.toDataURL(`image/${i}`,n);const r=document.getElementById("image-preview");r.width=a.width,r.height=a.height,r.src=Joomla.MediaManager.Edit.current.contents,document.getElementById("jform_rotate_a").value=e,window.dispatchEvent(new Event("mediaManager.history.point"))};Joomla.MediaManager.Edit.rotate={Activate(t){setTimeout((()=>{document.getElementById("jform_rotate_a").addEventListener("input",(({target:t})=>{e(parseInt(t.value,10)),[].slice.call(document.querySelectorAll("#jform_rotate_distinct label")).forEach((e=>{e.classList.remove("active"),e.classList.remove("focus")}))})),[].slice.call(document.querySelectorAll("#jform_rotate_distinct label")).forEach((t=>{t.addEventListener("click",(({target:t})=>{const a=document.querySelector(`#${t.getAttribute("for")}`);a&&e(parseInt(a.value,10))}))}))}),1e3)},Deactivate(){}}})();

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.