CoreFiles by mySites.guru
rotate.es6.min.js1 lines, 1,427 bytes, from Joomla_4.0.0-alpha6-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha5
md5
95f50d00be4f201705a0806797592346
sha1
c6ddc8114a8542071477b0d8f95e8ab79789d215
sha256
74c5e0c0e13e7bf1a7fae7c402d89aad726c8150729f2efd198c4eaf03cfdf1e
Joomla=window.Joomla||{},Joomla.MediaManager=Joomla.MediaManager||{},Joomla.MediaManager.Edit=Joomla.MediaManager.Edit||{},(()=>{"use strict";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",t=>{e(parseInt(t.target.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",t=>{e(parseInt(t.target.querySelector("input").value,10))})})},1e3)},Deactivate(){}}})();

The same content is in 2 releases, Joomla 4.0.0-alpha5 to 4.0.0-alpha6. See them all, or every version of this file.