CoreFiles by mySites.guru
rotate.es6.min.js1 lines, 1,468 bytes, from Joomla_4.0.0-beta3-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta2
md5
ceaa495c40731da21693292dfdc69c58
sha1
a68733e57cf81742903348f6144fe1941886a4f1
sha256
762884a90b274f5823941710ac004ac65592e61f25a8eb8d62061e3d2cd85dab
Joomla=window.Joomla||{},Joomla.MediaManager=Joomla.MediaManager||{},Joomla.MediaManager.Edit=Joomla.MediaManager.Edit||{},(()=>{'use strict';const a=a=>{const b=document.getElementById("image-source"),c=document.createElement("canvas");0<=a&&45>a||135<=a&&225>a||315<=a&&360>=a?(c.width=b.width,c.height=b.height):(c.width=b.height,c.height=b.width);const d=c.getContext("2d");d.translate(c.width/2,c.height/2),d.rotate(a*Math.PI/180),d.drawImage(b,-b.width/2,-b.height/2);const e="jpg"===Joomla.MediaManager.Edit.original.extension?"jpeg":"jpg",f=document.getElementById("jform_rotate_quality").value;Joomla.MediaManager.Edit.current.contents=c.toDataURL(`image/${e}`,f);const g=document.getElementById("image-preview");g.width=c.width,g.height=c.height,g.src=Joomla.MediaManager.Edit.current.contents,document.getElementById("jform_rotate_a").value=a,window.dispatchEvent(new Event("mediaManager.history.point"))},b=()=>{setTimeout(()=>{document.getElementById("jform_rotate_a").addEventListener("input",({target:b})=>{a(parseInt(b.value,10));const c=[].slice.call(document.querySelectorAll("#jform_rotate_distinct label"));c.forEach(a=>{a.classList.remove("active"),a.classList.remove("focus")})});const b=[].slice.call(document.querySelectorAll("#jform_rotate_distinct label"));b.forEach(b=>{b.addEventListener("click",({target:b})=>{a(parseInt(b.querySelector("input").value,10))})})},1e3)};Joomla.MediaManager.Edit.rotate={Activate(a){b(a)},Deactivate(){}}})();

The same content is in 3 releases, Joomla 4.0.0-beta to 4.0.0-beta3. See them all, or every version of this file.