CoreFiles by mySites.guru
rotate-es5.min.js1 lines, 1,544 bytes, from Joomla_4.0.0-rc3-Release_Candidate-Full_Package.zip
Raw History Compare with 4.0.0-rc2
md5
46cd498267de17a843eac0dd02119757
sha1
62fb1876788d0842aa2218036042bd858255400f
sha256
db4433cd5107307101aca8d2814ff4594f48c85efb7142618f6f34a7fd22ac28
!function(){"use strict";var e;Joomla=window.Joomla||{},Joomla.MediaManager=Joomla.MediaManager||{},Joomla.MediaManager.Edit=Joomla.MediaManager.Edit||{},e=function(e){var 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);var i=a.getContext("2d");i.translate(a.width/2,a.height/2),i.rotate(e*Math.PI/180),i.drawImage(t,-t.width/2,-t.height/2);var o="jpg"===Joomla.MediaManager.Edit.original.extension?"jpeg":"jpg",n=document.getElementById("jform_rotate_quality").value;Joomla.MediaManager.Edit.current.contents=a.toDataURL("image/"+o,n);var 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:function(t){setTimeout((function(){document.getElementById("jform_rotate_a").addEventListener("input",(function(t){var a=t.target;e(parseInt(a.value,10)),[].slice.call(document.querySelectorAll("#jform_rotate_distinct label")).forEach((function(e){e.classList.remove("active"),e.classList.remove("focus")}))})),[].slice.call(document.querySelectorAll("#jform_rotate_distinct label")).forEach((function(t){t.addEventListener("click",(function(t){var a=t.target,i=document.querySelector("#"+a.getAttribute("for"));i&&e(parseInt(i.value,10))}))}))}),1e3)},Deactivate:function(){}}}();

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.